Automattic\WooCommerce\Vendor\GraphQL\Utils
SchemaExtender::extendScalarType
Method of the class: SchemaExtender{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->extendScalarType( $type ): CustomScalarType;
- $type(ScalarType) (required)
- .
SchemaExtender::extendScalarType() SchemaExtender::extendScalarType code WC 10.9.1
protected function extendScalarType(ScalarType $type): CustomScalarType
{
/** @var array<ScalarTypeExtensionNode> $extensionASTNodes */
$extensionASTNodes = $this->extensionASTNodes($type);
return new CustomScalarType([
'name' => $type->name,
'description' => $type->description,
'serialize' => [$type, 'serialize'],
'parseValue' => [$type, 'parseValue'],
'parseLiteral' => [$type, 'parseLiteral'],
'astNode' => $type->astNode,
'extensionASTNodes' => $extensionASTNodes,
]);
}