Automattic\WooCommerce\Vendor\GraphQL\Type
SchemaValidationContext::validateName
Method of the class: SchemaValidationContext{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->validateName( $object ): void;
- $object((Type&NamedType)|Directive|FieldDefinition|EnumValueDefinition|InputObjectField|Argument) (required)
- .
SchemaValidationContext::validateName() SchemaValidationContext::validateName code WC 10.9.1
private function validateName(object $object): void
{
// Ensure names are valid, however introspection types opt out.
$error = Utils::isValidNameError($object->name, $object->astNode);
if (
$error === null
|| ($object instanceof Type && Introspection::isIntrospectionType($object))
) {
return;
}
$this->addError($error);
}