-
Couldn't load subscription status.
- Fork 7
Add nullability directives #36
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
Co-authored-by: Benoit Lubek <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @martinbonnin - thanks for working on this!
Co-authored-by: Benoit Lubek <[email protected]>
Introduce 2 directives used to help working with nullability.
@semanticNonNull@semanticNonNullis the third state found in proposals such as SemanticNonNull except it adds no new GraphQL syntax.@semanticNonNullcan be used in the server schema but also as client extensions:@catch{ # generate user as `FieldResult<String, Error>` in Kotlin to have access to the error if needed user @catch(to: RESULT) { name } }@catchcan also be used to fail the whole response in case there is an error in one field:{ # fail the response if user or name has an associated error user @catch(to: THROW) { name } }