Automattic\WooCommerce\Vendor\GraphQL\Type

SchemaValidationContext::getFieldTypeNodeprivateWC 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->getFieldTypeNode( $type, $fieldName ): ?TypeNode;
$type(ObjectType|InterfaceType) (required)
.
$fieldName(string) (required)
.

SchemaValidationContext::getFieldTypeNode() code WC 10.9.1

private function getFieldTypeNode(Type $type, string $fieldName): ?TypeNode
{
    $fieldNode = $this->getFieldNode($type, $fieldName);

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