Automattic\WooCommerce\Vendor\GraphQL\Language
Parser::parseFieldDefinition
Method of the class: Parser{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->parseFieldDefinition(): FieldDefinitionNode;
Parser::parseFieldDefinition() Parser::parseFieldDefinition code WC 11.0.1
private function parseFieldDefinition(): FieldDefinitionNode
{
$start = $this->lexer->token;
$description = $this->parseDescription();
$name = $this->parseName();
$args = $this->parseArgumentsDefinition();
$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,
]);
}