Automattic\WooCommerce\Vendor\GraphQL\Language

Parser::parseInterfaceTypeDefinitionprivateWC 1.0

Method of the class: Parser{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->parseInterfaceTypeDefinition(): InterfaceTypeDefinitionNode;

Parser::parseInterfaceTypeDefinition() code WC 11.0.1

private function parseInterfaceTypeDefinition(): InterfaceTypeDefinitionNode
{
    $start = $this->lexer->token;
    $description = $this->parseDescription();
    $this->expectKeyword('interface');
    $name = $this->parseName();
    $interfaces = $this->parseImplementsInterfaces();
    $directives = $this->parseDirectives(true);
    $fields = $this->parseFieldsDefinition();

    return new InterfaceTypeDefinitionNode([
        'name' => $name,
        'directives' => $directives,
        'interfaces' => $interfaces,
        'fields' => $fields,
        'loc' => $this->loc($start),
        'description' => $description,
    ]);
}