Automattic\WooCommerce\Vendor\GraphQL\Utils

BuildClientSchema::getNamedTypeprivateWC 1.0

Method of the class: BuildClientSchema{}

No Hooks.

Returns

NamedType&Type.

Usage

// private - for code of main (parent) class only
$result = $this->getNamedType( $typeName ): NamedType;
$typeName(string) (required)
.

BuildClientSchema::getNamedType() code WC 10.9.1

private function getNamedType(string $typeName): NamedType
{
    if (! isset($this->typeMap[$typeName])) {
        throw new InvariantViolation("Invalid or incomplete schema, unknown type: {$typeName}. Ensure that a full introspection query is used in order to build a client schema.");
    }

    return $this->typeMap[$typeName];
}