-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Leaf field selections clarification #958
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
Conversation
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
I think "result type" instead of 'underlying type" is a more correct term to use. I reframed the explanatory text to more directly mirror the algorithm. @benjie let me know what you think |
Thanks for looking this over @leebyron! The term "result type" is only used once in the spec right now AFAICT and it's here. Imagine we have a selection set type Query {
foo: [[Int!]!]!
}
query Q { foo } If you asked me what the "result type" of the selection We have this kind of "the type includes wrapped versions of the type" wording throughout the spec text:
We also have places where we are more explicit, for example:
In the algorithm text we tend to be much more precise, though thinking about it, maybe that's simply by virtue of always checking if it is a non-null or list type first, so by the time it hits "is an Object type" it's already unwrapped... 🤔 I used the term "underlying type" influenced by:
Maybe we can solve this by defining "result type" to be this "underlying named type" (e.g. |
agree with @benjie that 'return type' would be confusing for this particular use, unwrapped or underlying type seem better |
Cool, I agree that "unwrapped" is more accurate and more consistent with how we refer to this kind of type elsewhere. My thought with "result" type was clarifying the type of value returned, as opposed to the type's involved with inputs or any other element of a field. Given the context that's probably unnecessary. Thanks both of you for championing this clarification, it's much better |
An alternative proposal to one of the changes in #957, this clarifies that we're talking about the "unwrapped type" or "underlying type" of the fields/selections.