-
Notifications
You must be signed in to change notification settings - Fork 5
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 null
literals as a value for arguments and input object fields
#6
Comments
This led me to wonder if there's a better graphql server implementation out there. The candidates (so far):
|
null
literals as a value for arguments and input fieldsnull
literals as a value for field arguments and input object fields
null
literals as a value for field arguments and input object fieldsnull
literals as a value for arguments and input object fields
I'm currently using a value:
I'm not sure if using a value is better or worse than using a type Ideally, I'd like to use Go's |
The implementation for Externally, the implementation uses inputs := map[string]interface{}{}
if input, ok := inputs["field1"]; ok {
if input == nil {
// Use nullValue{}
} else {
// Use value provided
}
} else {
// Not present, use `nil`
} |
graphql-go
doesn't supportnull
literals, but it's supported by the the graphql-spec: graphql/graphql-spec@3ce8b79.There's an existing issue and PR for
graphql-go
:Using the existing PR I've (mostly) fixed support for
null
: https://github.com/mpenick/graphql/tree/null_supportThe text was updated successfully, but these errors were encountered: