Automattic\WooCommerce\Vendor\GraphQL\Utils
BuildClientSchema::buildInputValue
Method of the class: BuildClientSchema{}
No Hooks.
Returns
UnnamedInputObjectFieldConfig.
Usage
$BuildClientSchema = new BuildClientSchema(); $BuildClientSchema->buildInputValue( $inputValueIntrospection ): array;
- $inputValueIntrospection(array) (required)
- .
BuildClientSchema::buildInputValue() BuildClientSchema::buildInputValue code WC 10.9.4
public function buildInputValue(array $inputValueIntrospection): array
{
$type = $this->getInputType($inputValueIntrospection['type']);
$inputValue = [
'description' => $inputValueIntrospection['description'],
'type' => $type,
];
if (isset($inputValueIntrospection['defaultValue'])) {
$inputValue['defaultValue'] = AST::valueFromAST(
Parser::parseValue($inputValueIntrospection['defaultValue']),
$type
);
}
return $inputValue;
}