Skip to content
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

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

Closed
rbalicki2 opened this issue May 16, 2023 · 1 comment · Fixed by #1025
Closed

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

rbalicki2 opened this issue May 16, 2023 · 1 comment · Fixed by #1025

Comments

@rbalicki2
Copy link

Lists contain at least one item; selection sets are defined as lists; yet an item can be removed from a selection set and it remains valid.

  • On the one hand, lists are 1+ items: A subscript suffix “Symbollist” is shorthand for a list of one or more of that symbol, represented as an additional recursive production..
  • SelectionSet is defined as { Selection List }
  • Fields are always optional within the context of a selection set, a field may be omitted and the selection set is still valid.

I assume that the last bullet point is wrong and the intent is to not support empty selection sets. Is that the case?

@benjie
Copy link
Member

benjie commented May 19, 2023

Indeed it is. Addressed in #1025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants