@@ -154,12 +154,16 @@ type Query {
154
154
155
155
SchemaExtension :
156
156
- extend schema Directives[ Const] ? { RootOperationTypeDefinition+ }
157
- - extend schema Directives[ Const]
157
+ - extend schema Directives[ Const] [ lookahead != SelectionSet ]
158
158
159
159
Schema extensions are used to represent a schema which has been extended from
160
160
an original schema. For example, this might be used by a GraphQL service which
161
161
adds additional operation types, or additional directives to an existing schema.
162
162
163
+ Note: Extensions without additional operation types must not be followed by a
164
+ {SelectionSet} query shorthand to avoid parsing ambiguity. This same limitation
165
+ occurs on the type extensions below.
166
+
163
167
** Schema Validation**
164
168
165
169
Schema extensions have the potential to be invalid if incorrectly defined.
@@ -902,8 +906,8 @@ type ExampleType {
902
906
903
907
ObjectTypeExtension :
904
908
- extend type Name ImplementsInterfaces ? Directives [Const ]? FieldsDefinition
905
- - extend type Name ImplementsInterfaces ? Directives [Const ]
906
- - extend type Name ImplementsInterfaces
909
+ - extend type Name ImplementsInterfaces ? Directives [Const ] [ lookahead != SelectionSet ]
910
+ - extend type Name ImplementsInterfaces [ lookahead != SelectionSet ]
907
911
908
912
Object type extensions are used to represent a type which has been extended from
909
913
some original type . For example , this might be used to represent local data , or
@@ -1071,7 +1075,7 @@ Interface types have the potential to be invalid if incorrectly defined.
1071
1075
1072
1076
InterfaceTypeExtension :
1073
1077
- extend interface Name Directives[ Const] ? FieldsDefinition
1074
- - extend interface Name Directives[ Const]
1078
+ - extend interface Name Directives[ Const] [ lookahead != SelectionSet ]
1075
1079
1076
1080
Interface type extensions are used to represent an interface which has been
1077
1081
extended from some original interface. For example, this might be used to
@@ -1294,7 +1298,7 @@ Enum types have the potential to be invalid if incorrectly defined.
1294
1298
1295
1299
EnumTypeExtension :
1296
1300
- extend enum Name Directives[ Const] ? EnumValuesDefinition
1297
- - extend enum Name Directives[ Const]
1301
+ - extend enum Name Directives[ Const] [ lookahead != SelectionSet ]
1298
1302
1299
1303
Enum type extensions are used to represent an enum type which has been
1300
1304
extended from some original enum type. For example, this might be used to
@@ -1424,7 +1428,7 @@ Literal Value | Variables | Coerced Value
1424
1428
1425
1429
InputObjectTypeExtension :
1426
1430
- extend input Name Directives [Const ]? InputFieldsDefinition
1427
- - extend input Name Directives [Const ]
1431
+ - extend input Name Directives [Const ] [ lookahead != SelectionSet ]
1428
1432
1429
1433
Input object type extensions are used to represent an input object type which
1430
1434
has been extended from some original input object type . For example , this might
0 commit comments