-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nullable interface lists are not idiomatic #484
Comments
You're missing an extra exclamation point.
This is GraphQL saying I want a type of Interface that is not nullable within an array that is not nullable. The generator will generate the correct code at that point. |
You're not wrong, but what I want is a non-nullable array of nullable values of that interface type. |
Per your example, isn't that exactly what you're getting currently?
The array itself is non-nullable (it's just a slice), of nullable values ( |
Both slices and interfaces act like pointers, and can be assigned nil without needing to be pointers. |
…ce-pointers Test for 99designs#484
Returning a list of nullable interface types generates a signature that is not idiomatic and is hard to work with.
Expected Behaviour
Actual Behavior
Minimal graphql.schema and models to reproduce
The text was updated successfully, but these errors were encountered: