OperationParams
in package
Structure representing parsed HTTP parameters for Automattic\WooCommerce\Vendor\GraphQL operation.
The properties in this class are not strictly typed, as this class is only meant to serve as an intermediary representation which is not yet validated.
Table of Contents
- $extensions : mixed
- Reserved for implementors to extend the protocol however they see fit.
- $operation : mixed
- The name of the operation in the document to execute.
- $originalInput : array<string|int, mixed>
- The raw params used to construct this instance.
- $query : mixed
- A document containing Automattic\WooCommerce\Vendor\GraphQL operations and fragments to execute.
- $queryId : mixed
- Id of the query (when using persisted queries).
- $readOnly : bool
- Executed in read-only context (e.g. via HTTP GET request)?
- $variables : mixed
- Values for any variables defined by the operation.
- create() : OperationParams
- Creates an instance from given array.
- decodeIfJSON() : mixed
- Decodes the value if it is JSON, otherwise returns it unchanged.
Properties
$extensions
Reserved for implementors to extend the protocol however they see fit.
public
mixed
$extensions
$operation
The name of the operation in the document to execute.
public
mixed
$operation
$originalInput
The raw params used to construct this instance.
public
array<string|int, mixed>
$originalInput
$query
A document containing Automattic\WooCommerce\Vendor\GraphQL operations and fragments to execute.
public
mixed
$query
$queryId
Id of the query (when using persisted queries).
public
mixed
$queryId
Valid aliases (case-insensitive):
- id
- queryId
- documentId
$readOnly
Executed in read-only context (e.g. via HTTP GET request)?
public
bool
$readOnly
$variables
Values for any variables defined by the operation.
public
mixed
$variables
Methods
create()
Creates an instance from given array.
public
static create(array<string, mixed> $params[, bool $readonly = false ]) : OperationParams
Parameters
- $params : array<string, mixed>
- $readonly : bool = false
Return values
OperationParams —decodeIfJSON()
Decodes the value if it is JSON, otherwise returns it unchanged.
protected
static decodeIfJSON(mixed $value) : mixed
Parameters
- $value : mixed
