Automattic\WooCommerce\Vendor\GraphQL\Utils

SchemaExtender::extendObjectTypeprotectedWC 1.0

Метод класса: SchemaExtender{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->extendObjectType( $type ): ObjectType;
$type(ObjectType) (обязательный)
.

Код SchemaExtender::extendObjectType() WC 11.0.1

protected function extendObjectType(ObjectType $type): ObjectType
{
    /** @var array<ObjectTypeExtensionNode> $extensionASTNodes */
    $extensionASTNodes = $this->extensionASTNodes($type);

    return new ObjectType([
        'name' => $type->name,
        'description' => $type->description,
        'interfaces' => fn (): array => $this->extendImplementedInterfaces($type),
        'fields' => fn (): array => $this->extendFieldMap($type),
        'isTypeOf' => [$type, 'isTypeOf'],
        'resolveField' => $type->resolveFieldFn,
        'argsMapper' => $type->argsMapper,
        'astNode' => $type->astNode,
        'extensionASTNodes' => $extensionASTNodes,
    ]);
}