Conversation
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
benjie
left a comment
There was a problem hiding this comment.
We have the concept of "leaf fields" and "leaf values" already (though it is introduced later in the spec), maybe we should reference that here instead. One concern at the moment is the current wording doesn't handle lists of scalars/enums (or lists of those lists!).
It's still better than what we currently have though; thanks for the contribution!
| down to fields which return scalar or enum values to ensure an unambiguously | ||
| shaped response. |
There was a problem hiding this comment.
| down to fields which return scalar or enum values to ensure an unambiguously | |
| shaped response. | |
| down to _leaf fields_ to ensure an unambiguously shaped response. |
Paired with this, it would be good to change this to a definition:
graphql-spec/spec/Section 5 -- Validation.md
Lines 729 to 730 in ff0d285
:: A field subselection is not allowed on leaf fields. A _leaf field_ is any
field with a scalar or enum unwrapped type.
AFAIK scalar and enum values are considered to be distinct throughout the specification so I think this would be more correct description of field selection.
I didn't change the sentence below the modified one because it doesn't contain any enum values, but I may add some if that'd be beneficial.
It really is a nitpick, but I stopped on it while reading the spec.