@@ -431,7 +431,7 @@ otherwise the field's name.
431431
432432FragmentSpread : ... FragmentName Directives?
433433
434- FragmentDefinition : fragment FragmentName on TypeCondition Directives? SelectionSet
434+ FragmentDefinition : fragment FragmentName TypeCondition Directives? SelectionSet
435435
436436FragmentName : Name but not ` on `
437437
@@ -519,7 +519,7 @@ produce the same response object.
519519
520520#### Type Conditions
521521
522- TypeCondition : NamedType
522+ TypeCondition : on NamedType
523523
524524Fragments must specify the type they apply to. In this example, ` friendFields `
525525can be used in the context of querying a ` User ` .
@@ -578,7 +578,7 @@ will be present and `friends` will not.
578578
579579#### Inline Fragments
580580
581- InlineFragment : ... on TypeCondition Directives? SelectionSet
581+ InlineFragment : ... TypeCondition? Directives? SelectionSet
582582
583583Fragments can be defined inline within a selection set. This is done to
584584conditionally include fields based on their runtime type. This feature of
@@ -603,6 +603,24 @@ query inlineFragmentTyping {
603603}
604604```
605605
606+ Inline fragments may also be used to apply a directive to a group of fields.
607+ If the TypeCondition is omitted, an inline fragment is considered to be of the
608+ same type as the enclosing context.
609+
610+ ``` graphql
611+ query inlineFragmentNoType ($expandedInfo : Boolean ) {
612+ user (handle : " zuck" ) {
613+ id
614+ name
615+ ... @include (if : $expandedInfo ) {
616+ firstName
617+ lastName
618+ birthday
619+ }
620+ }
621+ }
622+ ```
623+
606624
607625### Input Values
608626
0 commit comments