Automattic\WooCommerce\Vendor\GraphQL\Utils

SchemaExtender::extendEnumTypeprotectedWC 1.0

Method of the class: SchemaExtender{}

No Hooks.

Returns

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->extendEnumType( $type ): EnumType;
$type(EnumType) (required)
.

SchemaExtender::extendEnumType() code WC 10.9.1

protected function extendEnumType(EnumType $type): EnumType
{
    /** @var array<EnumTypeExtensionNode> $extensionASTNodes */
    $extensionASTNodes = $this->extensionASTNodes($type);

    return new EnumType([
        'name' => $type->name,
        'description' => $type->description,
        'values' => $this->extendEnumValueMap($type),
        'astNode' => $type->astNode,
        'extensionASTNodes' => $extensionASTNodes,
    ]);
}