-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
With go 1.18 generics are now possible to use.
These can be used for example to implement the Optional concept:
https://github.com/frenchie4111/go-generic-optional
Although the current workaround with input_as_map works, we also have following issues:
- When the order of arguments change for a GraphQL input object, we must migrate our existing code
- When the variable-name order changes but the type order does not, we won't even notice this through our linter
- auto-completion is not very good for function arguments
When instead we go back to structs but use the Optional concept from above package, we could have the best of both worlds:
- no order dependencies
- don't send optional values as nil
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels