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

Allow nullable & optional variables and variables with default values #2949

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

martinbonnin
Copy link
Contributor

Allow optional variables (the ones that can be absent) to have a "null" value.

This is something that has been discussed a lot and is confusing because GraphQL doesn't really make the distinction between "optional" and "nullable" for input values in the type system. But it should still be possible to differentiate between "absent" and "null" at runtime. See graphql/graphql-spec#418 (comment)

Also make variables with a default variable optional. See #2686

Base automatically changed from remove-enum-value to dev-3.x February 25, 2021 10:13
@martinbonnin martinbonnin merged commit 8a1ea6f into dev-3.x Feb 25, 2021
@martinbonnin martinbonnin deleted the nullable-optional-variables branch February 25, 2021 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants