Automattic\WooCommerce\Vendor\GraphQL\Utils
BuildSchema::getOperationTypes
Method of the class: BuildSchema{}
No Hooks.
Returns
Array
Usage
// private - for code of main (parent) class only $result = $this->getOperationTypes( $schemaDef ): array;
- $schemaDef(SchemaDefinitionNode) (required)
- .
BuildSchema::getOperationTypes() BuildSchema::getOperationTypes code WC 10.9.1
private function getOperationTypes(SchemaDefinitionNode $schemaDef): array
{
/** @var array<string, string> $operationTypes */
$operationTypes = [];
foreach ($schemaDef->operationTypes as $operationType) {
$operationTypes[$operationType->operation] = $operationType->type->name->value;
}
return $operationTypes;
}