File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ export type Document = {
76
76
export type Definition = OperationDefinition
77
77
| FragmentDefinition
78
78
| TypeDefinition
79
+ | TypeExtensionDefinition
79
80
80
81
export type OperationDefinition = {
81
82
kind : 'OperationDefinition' ;
@@ -260,7 +261,6 @@ export type TypeDefinition = ObjectTypeDefinition
260
261
| ScalarTypeDefinition
261
262
| EnumTypeDefinition
262
263
| InputObjectTypeDefinition
263
- | TypeExtensionDefinition
264
264
265
265
export type ObjectTypeDefinition = {
266
266
kind : 'ObjectTypeDefinition' ;
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ function parseDocument(parser: Parser): Document {
182
182
* - OperationDefinition
183
183
* - FragmentDefinition
184
184
* - TypeDefinition
185
+ * - TypeExtensionDefinition
185
186
*/
186
187
function parseDefinition ( parser : Parser ) : Definition {
187
188
if ( peek ( parser , TokenKind . BRACE_L ) ) {
@@ -202,8 +203,8 @@ function parseDefinition(parser: Parser): Definition {
202
203
case 'union' :
203
204
case 'scalar' :
204
205
case 'enum' :
205
- case 'input' :
206
- case 'extend' : return parseTypeDefinition ( parser ) ;
206
+ case 'input' : return parseTypeDefinition ( parser ) ;
207
+ case 'extend' : return parseTypeExtensionDefinition ( parser ) ;
207
208
}
208
209
}
209
210
@@ -650,7 +651,6 @@ export function parseNamedType(parser: Parser): NamedType {
650
651
* - ScalarTypeDefinition
651
652
* - EnumTypeDefinition
652
653
* - InputObjectTypeDefinition
653
- * - TypeExtensionDefinition
654
654
*/
655
655
function parseTypeDefinition ( parser : Parser ) : TypeDefinition {
656
656
if ( ! peek ( parser , TokenKind . NAME ) ) {
@@ -669,8 +669,6 @@ function parseTypeDefinition(parser: Parser): TypeDefinition {
669
669
return parseEnumTypeDefinition ( parser ) ;
670
670
case 'input' :
671
671
return parseInputObjectTypeDefinition ( parser ) ;
672
- case 'extend' :
673
- return parseTypeExtensionDefinition ( parser ) ;
674
672
default :
675
673
throw unexpected ( parser ) ;
676
674
}
You can’t perform that action at this time.
0 commit comments