Automattic\WooCommerce\Vendor\GraphQL\Utils

BuildClientSchema::buildObjectDefprivateWC 1.0

Method of the class: BuildClientSchema{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->buildObjectDef( $object ): ObjectType;
$object(array) (required)
.

BuildClientSchema::buildObjectDef() code WC 10.9.4

private function buildObjectDef(array $object): ObjectType
{
    return new ObjectType([
        'name' => $object['name'],
        'description' => $object['description'],
        'interfaces' => fn (): array => $this->buildImplementationsList($object),
        'fields' => fn (): array => $this->buildFieldDefMap($object),
    ]);
}