Automattic\WooCommerce\Vendor\GraphQL\Utils
SchemaExtender::extendType
Method of the class: SchemaExtender{}
No Hooks.
Returns
T.
Usage
// protected - for code of main (parent) or child class $result = $this->extendType( $typeDef ): Type;
- $typeDef(T) (required)
- .
SchemaExtender::extendType() SchemaExtender::extendType code WC 10.9.1
protected function extendType(Type $typeDef): Type
{
if ($typeDef instanceof ListOfType) {
// @phpstan-ignore-next-line PHPStan does not understand this is the same generic type as the input
return Type::listOf($this->extendType($typeDef->getWrappedType()));
}
if ($typeDef instanceof NonNull) {
// @phpstan-ignore-next-line PHPStan does not understand this is the same generic type as the input
return Type::nonNull($this->extendType($typeDef->getWrappedType()));
}
// @phpstan-ignore-next-line PHPStan does not understand this is the same generic type as the input
return $this->extendNamedType($typeDef);
}