Automattic\WooCommerce\Vendor\GraphQL\Validator\Rules

UniqueFieldDefinitionNames::hasFieldprivate staticWC 1.0

Method of the class: UniqueFieldDefinitionNames{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = UniqueFieldDefinitionNames::hasField( ?NamedType $type, $fieldName ): bool;
?NamedType $type(required)
.
$fieldName(string) (required)
.

UniqueFieldDefinitionNames::hasField() code WC 10.9.1

private static function hasField(?NamedType $type, string $fieldName): bool
{
    if ($type instanceof ObjectType || $type instanceof InterfaceType || $type instanceof InputObjectType) {
        return $type->hasField($fieldName);
    }

    return false;
}