Skip to content

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

@rbalicki2

Description

@rbalicki2

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions