src/Language/Parser.php
private function parseSchemaDefinition()
    {
        $start = $this->lexer->token;
        $this->expectKeyword('schema');
        $directives = $this->parseDirectives(true);

        $operationTypes = $this->many(
            Token::BRACE_L,
            function () {
                return $this->parseOperationTypeDefinition();
            },
            Token::BRACE_R
        );

        return new SchemaDefinitionNode([
            'directives'     => $directives,
            'operationTypes' => $operationTypes,
            'loc'            => $this->loc($start),
        ]);
    }
private function parseSchemaDefinition()
    {
        $start = $this->lexer->token;
        $this->expectKeyword('schema');
        $directives = $this->parseDirectives(true);

        $operationTypes = $this->many(
            Token::BRACE_L,
            function () {
                return $this->parseOperationTypeDefinition();
            },
            Token::BRACE_R
        );

        return new SchemaDefinitionNode([
            'directives'     => $directives,
            'operationTypes' => $operationTypes,
            'loc'            => $this->loc($start),
        ]);
    }
private function parseSchemaDefinition ( ) { $ start = $ this -> lexer -> token ; $ this -> expectKeyword ( 'schema' ) ; $ directives = $ this -> parseDirectives ( true ) ; $ operationTypes = $ this -> many ( Token :: BRACE_L , function ( ) { return $ this -> parseOperationTypeDefinition ( ) ; } , Token :: BRACE_R ) ; return new SchemaDefinitionNode ( [ 'directives' => $ directives , 'operationTypes' => $ operationTypes , 'loc' => $ this -> loc ( $ start ) , ] ) ; }
@return SchemaDefinitionNode

@throws SyntaxError
@return SchemaDefinitionNode