Closed
Description
While working on an issue in graphql-ruby
, I needed clarity on the expected behaviour of variables with default values and null
value in the following example:
Query
query ($id: ID = 4) {
film(filmID: $id) {
title
}
}
Variables
{
"id": null
}
In graphql-js
, null
takes precedence over the default value of $id
and the film
resolver receives filmID: null
.
The spec suggests the following algorithm for dealing with this case:
However, I got a bit confused when I read this:
It might just be me, but I got confused with "represent the lack of a value" and "if value does not exist".
Is "represent the lack of a value" misleading?
/cc @leebyron re: #83
/cc @rmosolgo @xuorig what we were talking about
Metadata
Metadata
Assignees
Labels
No labels