OperationDefinitionNode
extends Node
in package
implements
ExecutableDefinitionNode, HasSelectionSet
type Node = NameNode | DocumentNode | OperationDefinitionNode | VariableDefinitionNode | VariableNode | SelectionSetNode | FieldNode | ArgumentNode | FragmentSpreadNode | InlineFragmentNode | FragmentDefinitionNode | IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | EnumValueNode | ListValueNode | ObjectValueNode | ObjectFieldNode | DirectiveNode | ListTypeNode | NonNullTypeNode.
Tags
Interfaces, Classes and Traits
- ExecutableDefinitionNode
- export type ExecutableDefinitionNode = | OperationDefinitionNode | FragmentDefinitionNode;.
- HasSelectionSet
- export type DefinitionNode = OperationDefinitionNode | FragmentDefinitionNode.
Table of Contents
- $directives : NodeList
- $kind : string
- $loc : Location|null
- $name : NameNode|null
- $operation : string
- $selectionSet : SelectionSetNode
- $variableDefinitions : NodeList
- __construct() : mixed
- __toString() : string
- cloneDeep() : static
- Returns a clone of this instance and all its children, except Location $loc.
- getSelectionSet() : SelectionSetNode
- jsonSerialize() : array<string, mixed>
- Improves upon the default serialization by: - excluding null values - excluding large reference values such as @see Location::$source.
- toArray() : array<string, mixed>
- cloneValue() : mixed
- recursiveToArray() : array<string, mixed>
Properties
$directives
public
NodeList
$directives
$kind
public
string
$kind
= AutomatticWooCommerceVendorGraphQLLanguageASTNodeKind::OPERATION_DEFINITION
$loc
public
Location|null
$loc
= null
$name
public
NameNode|null
$name
= null
$operation
public
string
$operation
$selectionSet
public
SelectionSetNode
$selectionSet
$variableDefinitions
public
NodeList
$variableDefinitions
Methods
__construct()
public
__construct(array<string|int, mixed> $vars) : mixed
Parameters
- $vars : array<string|int, mixed>
Return values
mixed —__toString()
public
__toString() : string
Tags
Return values
string —cloneDeep()
Returns a clone of this instance and all its children, except Location $loc.
public
cloneDeep() : static
Tags
Return values
static —getSelectionSet()
public
getSelectionSet() : SelectionSetNode
Return values
SelectionSetNode —jsonSerialize()
Improves upon the default serialization by: - excluding null values - excluding large reference values such as @see Location::$source.
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed> —toArray()
public
toArray() : array<string, mixed>
Return values
array<string, mixed> —cloneValue()
protected
static cloneValue(mixed $value) : mixed
Parameters
- $value : mixed
Tags
Return values
mixed —recursiveToArray()
private
static recursiveToArray(Node $node) : array<string, mixed>
Parameters
- $node : Node
