GraphQL\Language\Parser::parseObjectTypeDefinition PHP Method

parseObjectTypeDefinition() public method

public parseObjectTypeDefinition ( ) : ObjectTypeDefinitionNode
return GraphQL\Language\AST\ObjectTypeDefinitionNode
    function parseObjectTypeDefinition()
    {
        $start = $this->lexer->token;
        $this->expectKeyword('type');
        $name = $this->parseName();
        $interfaces = $this->parseImplementsInterfaces();
        $directives = $this->parseDirectives();
        $fields = $this->any(Token::BRACE_L, [$this, 'parseFieldDefinition'], Token::BRACE_R);
        return new ObjectTypeDefinitionNode(['name' => $name, 'interfaces' => $interfaces, 'directives' => $directives, 'fields' => $fields, 'loc' => $this->loc($start)]);
    }