Automattic\WooCommerce\Vendor\GraphQL\Utils
SchemaExtender::extendUnionType
Method of the class: SchemaExtender{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->extendUnionType( $type ): UnionType;
- $type(UnionType) (required)
- .
SchemaExtender::extendUnionType() SchemaExtender::extendUnionType code WC 10.9.1
protected function extendUnionType(UnionType $type): UnionType
{
/** @var array<UnionTypeExtensionNode> $extensionASTNodes */
$extensionASTNodes = $this->extensionASTNodes($type);
return new UnionType([
'name' => $type->name,
'description' => $type->description,
'types' => fn (): array => $this->extendUnionPossibleTypes($type),
'resolveType' => [$type, 'resolveType'],
'astNode' => $type->astNode,
'extensionASTNodes' => $extensionASTNodes,
]);
}