Automattic\WooCommerce\Vendor\GraphQL\Type
Introspection::typeNameMetaFieldDef
Method of the class: Introspection{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = Introspection::typeNameMetaFieldDef(): FieldDefinition;
Introspection::typeNameMetaFieldDef() Introspection::typeNameMetaFieldDef code WC 10.9.1
public static function typeNameMetaFieldDef(): FieldDefinition
{
return self::$cachedInstances[self::TYPE_NAME_FIELD_NAME] ??= new FieldDefinition([
'name' => self::TYPE_NAME_FIELD_NAME,
'type' => Type::nonNull(Type::string()),
'description' => 'The name of the current Object type at runtime.',
'args' => [],
'resolve' => static fn ($source, array $args, $context, ResolveInfo $info): string => $info->parentType->name,
]);
}