Automattic\WooCommerce\Vendor\GraphQL\Language
Parser::parseInterfaceTypeExtension
Method of the class: Parser{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->parseInterfaceTypeExtension(): InterfaceTypeExtensionNode;
Parser::parseInterfaceTypeExtension() Parser::parseInterfaceTypeExtension code WC 11.0.1
private function parseInterfaceTypeExtension(): InterfaceTypeExtensionNode
{
$start = $this->lexer->token;
$this->expectKeyword('extend');
$this->expectKeyword('interface');
$name = $this->parseName();
$interfaces = $this->parseImplementsInterfaces();
$directives = $this->parseDirectives(true);
$fields = $this->parseFieldsDefinition();
if (
count($interfaces) === 0
&& count($directives) === 0
&& count($fields) === 0
) {
throw $this->unexpected();
}
return new InterfaceTypeExtensionNode([
'name' => $name,
'directives' => $directives,
'interfaces' => $interfaces,
'fields' => $fields,
'loc' => $this->loc($start),
]);
}