@@ -563,14 +563,14 @@ fragment conflictingDifferingResponses on Pet {
563
563
564
564
* For each {selection} in the document
565
565
* Let {selectionType} be the result type of {selection}
566
- * If {selectionType} is a scalar:
566
+ * If {selectionType} is a scalar or enum :
567
567
* The subselection set of that selection must be empty
568
568
* If {selectionType} is an interface, union, or object
569
569
* The subselection set of that selection must NOT BE empty
570
570
571
571
** Explanatory Text**
572
572
573
- Field selections on scalars are never allowed: scalars
573
+ Field selections on scalars or enums are never allowed, because they
574
574
are the leaf nodes of any GraphQL query.
575
575
576
576
The following is valid.
@@ -584,15 +584,15 @@ fragment scalarSelection on Dog {
584
584
The following is invalid.
585
585
586
586
``` graphql counter-example
587
- fragment scalarSelectionsNotAllowedOnBoolean on Dog {
587
+ fragment scalarSelectionsNotAllowedOnInt on Dog {
588
588
barkVolume {
589
589
sinceWhen
590
590
}
591
591
}
592
592
```
593
593
594
594
Conversely the leaf field selections of GraphQL queries
595
- must be scalars . Leaf selections on objects, interfaces,
595
+ must be of type scalar or enum . Leaf selections on objects, interfaces,
596
596
and unions without subfields are disallowed.
597
597
598
598
Let's assume the following additions to the query root type of the schema:
0 commit comments