Skip to content
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

Support Client Controlled Nullability (CCN) #327

Closed
jpvajda opened this issue May 11, 2022 · 2 comments
Closed

Support Client Controlled Nullability (CCN) #327

jpvajda opened this issue May 11, 2022 · 2 comments
Labels

Comments

@jpvajda
Copy link
Contributor

jpvajda commented May 11, 2022

Client-Controlled nullability gives more power to the consumer of a GraphQL API. It allows us to specify error boundaries in GraphQL by defining if a field shall be nullable or required in our GraphQL request. To give this power to the user, the RFC introduces new query syntax to let the user override type nullability on fields and specify where error boundaries are in the GraphQL request.

Three new operators can be used:

  • A "required designator" represented by ! which marks a field Non-Nullable
  • An "optional designator" represented by ? which marks a field Nullable
  • A "list operator" represented by [] which allows the above two operators to be applied to the elements of a list, or the list as a whole.

References

graphql/graphql-spec#867

@jpvajda
Copy link
Contributor Author

jpvajda commented May 18, 2022

@trevor-scheer
Copy link
Member

This will almost certainly be handled by the respective teams and as a larger initiative across Apollo whenever this RFC reaches stage 2 / stage 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants