@@ -222,12 +222,16 @@ type Query {
222222
223223SchemaExtension :
224224 - extend schema Directives[ Const] ? { RootOperationTypeDefinition+ }
225- - extend schema Directives[ Const]
225+ - extend schema Directives[ Const] [ lookahead != ` { ` ]
226226
227227Schema extensions are used to represent a schema which has been extended from
228228an original schema. For example, this might be used by a GraphQL service which
229229adds additional operation types, or additional directives to an existing schema.
230230
231+ Note: Schema extensions without additional operation type definitions must not
232+ be followed by a {` { ` } (such as a query shorthand) to avoid parsing ambiguity.
233+ This same limitation applies to the type definitions and extensions below.
234+
231235** Schema Validation**
232236
233237Schema extensions have the potential to be invalid if incorrectly defined.
@@ -574,7 +578,9 @@ Scalar type extensions have the potential to be invalid if incorrectly defined.
574578
575579## Objects
576580
577- ObjectTypeDefinition : Description? type Name ImplementsInterfaces? Directives[ Const] ? FieldsDefinition?
581+ ObjectTypeDefinition :
582+ - Description? type Name ImplementsInterfaces? Directives[ Const] ? FieldsDefinition
583+ - Description? type Name ImplementsInterfaces? Directives[ Const] ? [ lookahead != ` { ` ]
578584
579585ImplementsInterfaces :
580586 - ImplementsInterfaces & NamedType
@@ -949,8 +955,8 @@ type ExampleType {
949955
950956ObjectTypeExtension :
951957 - extend type Name ImplementsInterfaces ? Directives [Const ]? FieldsDefinition
952- - extend type Name ImplementsInterfaces ? Directives [Const ]
953- - extend type Name ImplementsInterfaces
958+ - extend type Name ImplementsInterfaces ? Directives [Const ] [ lookahead != `{`]
959+ - extend type Name ImplementsInterfaces [ lookahead != `{`]
954960
955961Object type extensions are used to represent a type which has been extended from
956962some original type . For example , this might be used to represent local data , or
@@ -992,7 +998,9 @@ Object type extensions have the potential to be invalid if incorrectly defined.
992998
993999## Interfaces
9941000
995- InterfaceTypeDefinition : Description ? interface Name ImplementsInterfaces ? Directives [Const ]? FieldsDefinition ?
1001+ InterfaceTypeDefinition :
1002+ - Description ? interface Name ImplementsInterfaces ? Directives [Const ]? FieldsDefinition
1003+ - Description ? interface Name ImplementsInterfaces ? Directives [Const ]? [lookahead != `{`]
9961004
9971005GraphQL interfaces represent a list of named fields and their arguments . GraphQL
9981006objects and interfaces can then implement these interfaces which requires that
@@ -1182,8 +1190,8 @@ Interface types have the potential to be invalid if incorrectly defined.
11821190
11831191InterfaceTypeExtension :
11841192 - extend interface Name ImplementsInterfaces ? Directives [Const ]? FieldsDefinition
1185- - extend interface Name ImplementsInterfaces? Directives[ Const]
1186- - extend interface Name ImplementsInterfaces
1193+ - extend interface Name ImplementsInterfaces ? Directives [Const ] [ lookahead != `{`]
1194+ - extend interface Name ImplementsInterfaces [ lookahead != `{`]
11871195
11881196Interface type extensions are used to represent an interface which has been
11891197extended from some original interface . For example , this might be used to
@@ -1361,7 +1369,9 @@ Union type extensions have the potential to be invalid if incorrectly defined.
13611369
13621370## Enums
13631371
1364- EnumTypeDefinition : Description? enum Name Directives[ Const] ? EnumValuesDefinition?
1372+ EnumTypeDefinition :
1373+ - Description ? enum Name Directives [Const ]? EnumValuesDefinition
1374+ - Description ? enum Name Directives [Const ]? [lookahead != `{`]
13651375
13661376EnumValuesDefinition : { EnumValueDefinition + }
13671377
@@ -1411,7 +1421,7 @@ Enum types have the potential to be invalid if incorrectly defined.
14111421
14121422EnumTypeExtension :
14131423 - extend enum Name Directives [Const ]? EnumValuesDefinition
1414- - extend enum Name Directives[ Const]
1424+ - extend enum Name Directives [Const ] [ lookahead != `{`]
14151425
14161426Enum type extensions are used to represent an enum type which has been
14171427extended from some original enum type . For example , this might be used to
@@ -1432,7 +1442,9 @@ Enum type extensions have the potential to be invalid if incorrectly defined.
14321442
14331443## Input Objects
14341444
1435- InputObjectTypeDefinition : Description? input Name Directives[ Const] ? InputFieldsDefinition?
1445+ InputObjectTypeDefinition :
1446+ - Description ? input Name Directives [Const ]? InputFieldsDefinition
1447+ - Description ? input Name Directives [Const ]? [lookahead != `{`]
14361448
14371449InputFieldsDefinition : { InputValueDefinition + }
14381450
@@ -1599,7 +1611,7 @@ Literal Value | Variables | Coerced Value
15991611
16001612InputObjectTypeExtension :
16011613 - extend input Name Directives [Const ]? InputFieldsDefinition
1602- - extend input Name Directives [Const ]
1614+ - extend input Name Directives [Const ] [ lookahead != `{`]
16031615
16041616Input object type extensions are used to represent an input object type which
16051617has been extended from some original input object type . For example , this might
0 commit comments