Automattic\WooCommerce\Vendor\GraphQL\Utils

BuildClientSchema::buildScalarDefprivateWC 1.0

Method of the class: BuildClientSchema{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->buildScalarDef( $scalar ): ScalarType;
$scalar(array) (required)
.

BuildClientSchema::buildScalarDef() code WC 10.9.1

private function buildScalarDef(array $scalar): ScalarType
{
    return new CustomScalarType([
        'name' => $scalar['name'],
        'description' => $scalar['description'],
        'serialize' => static fn ($value) => $value,
    ]);
}