@@ -348,7 +348,7 @@ export class Parser {
348348 selectionSet : this . parseSelectionSet ( ) ,
349349 } ) ;
350350 }
351- const operation = this . parseOperationType ( ) ;
351+ const operation = this . parseOperationKind ( ) ;
352352 let name ;
353353 if ( this . peek ( TokenKind . NAME ) ) {
354354 name = this . parseName ( ) ;
@@ -364,9 +364,9 @@ export class Parser {
364364 }
365365
366366 /**
367- * OperationType : one of query mutation subscription
367+ * OperationKind : one of query mutation subscription
368368 */
369- parseOperationType ( ) : OperationTypeNode {
369+ parseOperationKind ( ) : OperationTypeNode {
370370 const operationToken = this . expectToken ( TokenKind . NAME ) ;
371371 switch ( operationToken . value ) {
372372 case 'query' :
@@ -857,15 +857,15 @@ export class Parser {
857857
858858 /**
859859 * ```
860- * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
860+ * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition* }
861861 * ```
862862 */
863863 parseSchemaDefinition ( ) : SchemaDefinitionNode {
864864 const start = this . _lexer . token ;
865865 const description = this . parseDescription ( ) ;
866866 this . expectKeyword ( 'schema' ) ;
867867 const directives = this . parseConstDirectives ( ) ;
868- const operationTypes = this . many (
868+ const operationTypes = this . any (
869869 TokenKind . BRACE_L ,
870870 this . parseOperationTypeDefinition ,
871871 TokenKind . BRACE_R ,
@@ -879,11 +879,11 @@ export class Parser {
879879 }
880880
881881 /**
882- * OperationTypeDefinition : OperationType : NamedType
882+ * OperationTypeDefinition : OperationKind : NamedType
883883 */
884884 parseOperationTypeDefinition ( ) : OperationTypeDefinitionNode {
885885 const start = this . _lexer . token ;
886- const operation = this . parseOperationType ( ) ;
886+ const operation = this . parseOperationKind ( ) ;
887887 this . expectToken ( TokenKind . COLON ) ;
888888 const type = this . parseNamedType ( ) ;
889889 return this . node < OperationTypeDefinitionNode > ( start , {
0 commit comments