@@ -154,12 +154,16 @@ type Query {
154154
155155SchemaExtension :
156156 - extend schema Directives[ Const] ? { RootOperationTypeDefinition+ }
157- - extend schema Directives[ Const]
157+ - extend schema Directives[ Const] [ lookahead != ` { ` ]
158158
159159Schema extensions are used to represent a schema which has been extended from
160160an original schema. For example, this might be used by a GraphQL service which
161161adds additional operation types, or additional directives to an existing schema.
162162
163+ Note: Schema extensions without additional operation type definitions must not
164+ be followed by a {` { ` } (such as a query shorthand) to avoid parsing ambiguity.
165+ This same limitation applies to the type definitions and extensions below.
166+
163167** Schema Validation**
164168
165169Schema extensions have the potential to be invalid if incorrectly defined.
@@ -550,7 +554,9 @@ Scalar type extensions have the potential to be invalid if incorrectly defined.
550554
551555## Objects
552556
553- ObjectTypeDefinition : Description? type Name ImplementsInterfaces? Directives[ Const] ? FieldsDefinition?
557+ ObjectTypeDefinition :
558+ - Description? type Name ImplementsInterfaces? Directives[ Const] ? FieldsDefinition
559+ - Description? type Name ImplementsInterfaces? Directives[ Const] ? [ lookahead != ` { ` ]
554560
555561ImplementsInterfaces :
556562 - ImplementsInterfaces & NamedType
@@ -902,8 +908,8 @@ type ExampleType {
902908
903909ObjectTypeExtension :
904910 - extend type Name ImplementsInterfaces ? Directives [Const ]? FieldsDefinition
905- - extend type Name ImplementsInterfaces ? Directives [Const ]
906- - extend type Name ImplementsInterfaces
911+ - extend type Name ImplementsInterfaces ? Directives [Const ] [ lookahead != `{`]
912+ - extend type Name ImplementsInterfaces [ lookahead != `{`]
907913
908914Object type extensions are used to represent a type which has been extended from
909915some original type . For example , this might be used to represent local data , or
@@ -944,7 +950,9 @@ Object type extensions have the potential to be invalid if incorrectly defined.
944950
945951## Interfaces
946952
947- InterfaceTypeDefinition : Description ? interface Name Directives [Const ]? FieldsDefinition ?
953+ InterfaceTypeDefinition :
954+ - Description ? interface Name Directives [Const ]? FieldsDefinition
955+ - Description ? interface Name Directives [Const ]? [lookahead != `{`]
948956
949957GraphQL interfaces represent a list of named fields and their arguments . GraphQL
950958objects can then implement these interfaces which requires that the object type
@@ -1071,7 +1079,7 @@ Interface types have the potential to be invalid if incorrectly defined.
10711079
10721080InterfaceTypeExtension :
10731081 - extend interface Name Directives [Const ]? FieldsDefinition
1074- - extend interface Name Directives[ Const]
1082+ - extend interface Name Directives [Const ] [ lookahead != `{`]
10751083
10761084Interface type extensions are used to represent an interface which has been
10771085extended from some original interface . For example , this might be used to
@@ -1244,7 +1252,9 @@ Union type extensions have the potential to be invalid if incorrectly defined.
12441252
12451253## Enums
12461254
1247- EnumTypeDefinition : Description? enum Name Directives[ Const] ? EnumValuesDefinition?
1255+ EnumTypeDefinition :
1256+ - Description ? enum Name Directives [Const ]? EnumValuesDefinition
1257+ - Description ? enum Name Directives [Const ]? [lookahead != `{`]
12481258
12491259EnumValuesDefinition : { EnumValueDefinition + }
12501260
@@ -1294,7 +1304,7 @@ Enum types have the potential to be invalid if incorrectly defined.
12941304
12951305EnumTypeExtension :
12961306 - extend enum Name Directives [Const ]? EnumValuesDefinition
1297- - extend enum Name Directives[ Const]
1307+ - extend enum Name Directives [Const ] [ lookahead != `{`]
12981308
12991309Enum type extensions are used to represent an enum type which has been
13001310extended from some original enum type . For example , this might be used to
@@ -1314,7 +1324,9 @@ Enum type extensions have the potential to be invalid if incorrectly defined.
13141324
13151325## Input Objects
13161326
1317- InputObjectTypeDefinition : Description? input Name Directives[ Const] ? InputFieldsDefinition?
1327+ InputObjectTypeDefinition :
1328+ - Description ? input Name Directives [Const ]? InputFieldsDefinition
1329+ - Description ? input Name Directives [Const ]? [lookahead != `{`]
13181330
13191331InputFieldsDefinition : { InputValueDefinition + }
13201332
@@ -1424,7 +1436,7 @@ Literal Value | Variables | Coerced Value
14241436
14251437InputObjectTypeExtension :
14261438 - extend input Name Directives [Const ]? InputFieldsDefinition
1427- - extend input Name Directives [Const ]
1439+ - extend input Name Directives [Const ] [ lookahead != `{`]
14281440
14291441Input object type extensions are used to represent an input object type which
14301442has been extended from some original input object type . For example , this might
0 commit comments