@@ -563,14 +563,14 @@ fragment conflictingDifferingResponses on Pet {
563563
564564 * For each {selection} in the document
565565 * Let {selectionType} be the result type of {selection}
566- * If {selectionType} is a scalar:
566+ * If {selectionType} is a scalar or enum :
567567 * The subselection set of that selection must be empty
568568 * If {selectionType} is an interface, union, or object
569569 * The subselection set of that selection must NOT BE empty
570570
571571** Explanatory Text**
572572
573- Field selections on scalars are never allowed: scalars
573+ Field selections on scalars or enums are never allowed, because they
574574are the leaf nodes of any GraphQL query.
575575
576576The following is valid.
@@ -584,15 +584,15 @@ fragment scalarSelection on Dog {
584584The following is invalid.
585585
586586``` graphql counter-example
587- fragment scalarSelectionsNotAllowedOnBoolean on Dog {
587+ fragment scalarSelectionsNotAllowedOnInt on Dog {
588588 barkVolume {
589589 sinceWhen
590590 }
591591}
592592```
593593
594594Conversely 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,
596596and unions without subfields are disallowed.
597597
598598Let's assume the following additions to the query root type of the schema:
0 commit comments