src/Language/Parser.php
private function parseFieldDefinition()
    {
        $start       = $this->lexer->token;
        $description = $this->parseDescription();
        $name        = $this->parseName();
        $args        = $this->parseArgumentDefs();
        $this->expect(Token::COLON);
        $type       = $this->parseTypeReference();
        $directives = $this->parseDirectives(true);

        return new FieldDefinitionNode([
            'name'        => $name,
            'arguments'   => $args,
            'type'        => $type,
            'directives'  => $directives,
            'loc'         => $this->loc($start),
            'description' => $description,
        ]);
    }
private function parseFieldDefinition()
    {
        $start       = $this->lexer->token;
        $description = $this->parseDescription();
        $name        = $this->parseName();
        $args        = $this->parseArgumentDefs();
        $this->expect(Token::COLON);
        $type       = $this->parseTypeReference();
        $directives = $this->parseDirectives(true);

        return new FieldDefinitionNode([
            'name'        => $name,
            'arguments'   => $args,
            'type'        => $type,
            'directives'  => $directives,
            'loc'         => $this->loc($start),
            'description' => $description,
        ]);
    }
private function parseFieldDefinition ( ) { $ start = $ this -> lexer -> token ; $ description = $ this -> parseDescription ( ) ; $ name = $ this -> parseName ( ) ; $ args = $ this -> parseArgumentDefs ( ) ; $ this -> expect ( Token :: COLON ) ; $ type = $ this -> parseTypeReference ( ) ; $ directives = $ this -> parseDirectives ( true ) ; return new FieldDefinitionNode ( [ 'name' => $ name , 'arguments' => $ args , 'type' => $ type , 'directives' => $ directives , 'loc' => $ this -> loc ( $ start ) , 'description' => $ description , ] ) ; }
@return FieldDefinitionNode

@throws SyntaxError
@return FieldDefinitionNode