Automattic\WooCommerce\Vendor\GraphQL\Utils
SchemaExtender::extendType
Метод класса: SchemaExtender{}
Хуков нет.
Возвращает
T.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->extendType( $typeDef ): Type;
- $typeDef(T) (обязательный)
- .
Код SchemaExtender::extendType() SchemaExtender::extendType WC 11.0.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);
}