Automattic\WooCommerce\Vendor\GraphQL\Type

SchemaValidationContext::getDirectiveArgTypeNodeprivateWC 1.0

Method of the class: SchemaValidationContext{}

No Hooks.

Returns

NamedTypeNode|ListTypeNode|NonNullTypeNode|null.

Usage

// private - for code of main (parent) class only
$result = $this->getDirectiveArgTypeNode( $directive, $argName ): ?TypeNode;
$directive(Directive) (required)
.
$argName(string) (required)
.

SchemaValidationContext::getDirectiveArgTypeNode() code WC 10.9.4

private function getDirectiveArgTypeNode(Directive $directive, string $argName): ?TypeNode
{
    $argNode = $this->getAllDirectiveArgNodes($directive, $argName)[0] ?? null;

    return $argNode === null
        ? null
        : $argNode->type;
}