You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"The same two methods of representing the lack of a value are possible via variables by either providing the a variable value as null and not providing a variable value at all."
I'd be happy to update this with a PR however I'm not sure what to replace it with.
"the a variable" looks like a grammar mistake.
"[V]ariable" should be called out more explicitly since the paragraph right above speaks of arguments and the two are easily confused for one another.
I'm not entirely sure what this is trying to state. Does it mean, "Using a Variable of value null and not providing a Variable at all are equivalent"? Which would mean null is the same as no value existing for the argument? Doesn't this contradict "The first has explicitly provided null to the argument “arg”, while the second has implicitly not provided a value to the argument “arg”. These two forms may be interpreted differently."?
Once 3 is clarified I'd be happy to open a PR.
The text was updated successfully, but these errors were encountered:
"[V]ariable" should be called out more explicitly since the paragraph right above speaks of arguments and the two are easily confused for one another.
I think it would be appropriate to change it to "query variables", similar to other places in the spec.
I'm not entirely sure what this is trying to state. Does it mean, "Using a Variable of value null and not providing a Variable at all are equivalent"? Which would mean null is the same as no value existing for the argument? Doesn't this contradict "The first has explicitly provided null to the argument “arg”, while the second has implicitly not provided a value to the argument “arg”. These two forms may be interpreted differently."?
It's mean if you have the query like that:
querygetProfileName($id: ID) {
profile(id: $id) {
name
}
}
And you can't specify id variable you can pass either {} or { id: null }.
Note: there are some differences between specifying null and omitting values.
For example, if you change the query to (note default value):
querygetProfileName($id: ID = 1) {
profile(id: $id) {
name
}
}
passing {} will be equavivalent to { profile(id: 1) ...
and { id: null } to { profile(id: null) ...
Also, note that resolver can behave differently if it receives null as one of the arguments or if the same argument is omitted. So it's up to resolver to either treat null and omit value as equivalent or attach different semantic meaning to them.
Would be great if you incorporate above two points in your PR.
P.S. Some of the details around null were clarified only recently, here is some background: #418
https://facebook.github.io/graphql/June2018/#sec-Null-Value
"The same two methods of representing the lack of a value are possible via variables by either providing the a variable value as null and not providing a variable value at all."
I'd be happy to update this with a PR however I'm not sure what to replace it with.
null
and not providing a Variable at all are equivalent"? Which would meannull
is the same as no value existing for the argument? Doesn't this contradict "The first has explicitly provided null to the argument “arg”, while the second has implicitly not provided a value to the argument “arg”. These two forms may be interpreted differently."?Once 3 is clarified I'd be happy to open a PR.
The text was updated successfully, but these errors were encountered: