Automattic\WooCommerce\Vendor\GraphQL\Type

SchemaValidationContext::getAllFieldArgNodesprivateWC 1.0

Method of the class: SchemaValidationContext{}

No Hooks.

Returns

Array. InputValueDefinitionNode>

Usage

// private - for code of main (parent) class only
$result = $this->getAllFieldArgNodes( $type, $fieldName, $argName ): array;
$type(ObjectType|InterfaceType) (required)
.
$fieldName(string) (required)
.
$argName(string) (required)
.

SchemaValidationContext::getAllFieldArgNodes() code WC 10.9.1

private function getAllFieldArgNodes(Type $type, string $fieldName, string $argName): array
{
    $argNodes = [];
    $fieldNode = $this->getFieldNode($type, $fieldName);
    if ($fieldNode !== null) {
        foreach ($fieldNode->arguments as $node) {
            if ($node->name->value === $argName) {
                $argNodes[] = $node;
            }
        }
    }

    return $argNodes;
}