GraphQL\Language\Parser::parseInterfaceTypeDefinition PHP Method

parseInterfaceTypeDefinition() public method

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