Automattic\WooCommerce\Vendor\GraphQL\Utils

SchemaExtender::extendNamedTypeWithoutCacheprotectedWC 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->extendNamedTypeWithoutCache( $type ): Type;
$type(Type) (required)
.

SchemaExtender::extendNamedTypeWithoutCache() code WC 10.9.1

protected function extendNamedTypeWithoutCache(Type $type): Type
{
    switch (true) {
        case $type instanceof ScalarType: return $this->extendScalarType($type);
        case $type instanceof ObjectType: return $this->extendObjectType($type);
        case $type instanceof InterfaceType: return $this->extendInterfaceType($type);
        case $type instanceof UnionType: return $this->extendUnionType($type);
        case $type instanceof EnumType: return $this->extendEnumType($type);
        case $type instanceof InputObjectType: return $this->extendInputObjectType($type);
        default:
            $unconsideredType = get_class($type);
            throw new \Exception("Unconsidered type: {$unconsideredType}.");
    }
}