WooCommerce Code Reference

LeafType

Table of Contents

parseLiteral()  : mixed
Parses an externally provided literal value (hardcoded in Automattic\WooCommerce\Vendor\GraphQL query) to use as an input.
parseValue()  : mixed
Parses an externally provided value (query variable) to use as an input.
serialize()  : mixed
Serializes an internal value to include in a response.

Methods

parseLiteral()

Parses an externally provided literal value (hardcoded in Automattic\WooCommerce\Vendor\GraphQL query) to use as an input.

public parseLiteral(ValueNode|Node $valueNode[, array<string, mixed>|null $variables = null ]) : mixed

Should throw an exception with a client-friendly message on invalid value nodes, @see ClientAware.

Parameters
$valueNode : ValueNode|Node
$variables : array<string, mixed>|null = null
Tags
throws
Error
Return values
mixed

parseValue()

Parses an externally provided value (query variable) to use as an input.

public parseValue(mixed $value) : mixed

Should throw an exception with a client-friendly message on invalid values, @see ClientAware.

Parameters
$value : mixed
Tags
throws
Error
Return values
mixed