Automattic\WooCommerce\Vendor\GraphQL\Utils

BuildClientSchema::getOutputTypeprivateWC 1.0

Method of the class: BuildClientSchema{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->getOutputType( $typeRef ): OutputType;
$typeRef(array) (required)
.

BuildClientSchema::getOutputType() code WC 10.9.1

private function getOutputType(array $typeRef): OutputType
{
    $type = $this->getType($typeRef);

    if ($type instanceof OutputType) {
        return $type;
    }

    $notInputType = Utils::printSafe($type);
    throw new InvariantViolation("Introspection must provide output type for fields, but received: {$notInputType}.");
}