Skip to content

Conversation

benjie
Copy link
Member

@benjie benjie commented May 19, 2023

This paragraph is trying to make clear that if you have a type like type Foo { foo: Int!, bar: Int!, baz: Int! } that the selection set { foo bar } is valid for it - you do not have to select baz even if it's non-nullable, since non-nullable does not mean "required" for output fields.

However, it does read ambiguously, implying that you may remove any field from any selection set and the selection set will still be valid. If you remove the field foo from the selection set { foo } then that selection set ({ }) is no longer valid, since it is empty.

I've added a clarifying parenthesis to the text.

Fixes #1024

@graphql/tsc Can I get a couple checkmarks please? 😉

@benjie benjie added the ✏️ Editorial PR is non-normative or does not influence implementation label May 19, 2023
@benjie benjie requested a review from a team May 19, 2023 15:06
@netlify
Copy link

netlify bot commented May 19, 2023

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 1a818fc
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/646790952516550008b2040d
😎 Deploy Preview https://deploy-preview-1025--graphql-spec-draft.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✏️ Editorial PR is non-normative or does not influence implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GraphQL spec is contradictory: can selection sets be empty or not?

3 participants