Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/Section 5 -- Validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ fragment conflictingDifferingResponses on Pet {

**Explanatory Text**

Field selections on scalars are never allowed: scalars
Field selections on scalars or enums are never allowed: scalars and enums
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe instead of : scalars and enums write because they are the leaf nodes of any GraphQL query.

are the leaf nodes of any GraphQL query.

The following is valid.
Expand All @@ -582,15 +582,15 @@ fragment scalarSelection on Dog {
The following is invalid.

```graphql counter-example
fragment scalarSelectionsNotAllowedOnBoolean on Dog {
fragment scalarSelectionsNotAllowedOnInt on Dog {
barkVolume {
sinceWhen
}
}
```

Conversely the leaf field selections of GraphQL queries
must be scalars. Leaf selections on objects, interfaces,
must be of type scalar or enum. Leaf selections on objects, interfaces,
and unions without subfields are disallowed.

Let's assume the following additions to the query root type of the schema:
Expand Down