Automattic\WooCommerce\Vendor\GraphQL\Server
Helper::resolveRootValue
Method of the class: Helper{}
No Hooks.
Returns
mixed.
Usage
// protected - for code of main (parent) or child class $result = $this->resolveRootValue( $config, $params, $doc, $operationType );
- $config(ServerConfig) (required)
- .
- $params(OperationParams) (required)
- .
- $doc(DocumentNode) (required)
- .
- $operationType(string) (required)
- .
Helper::resolveRootValue() Helper::resolveRootValue code WC 11.1.2
protected function resolveRootValue(
ServerConfig $config,
OperationParams $params,
DocumentNode $doc,
string $operationType
) {
$rootValue = $config->getRootValue();
if (is_callable($rootValue)) {
$rootValue = $rootValue($params, $doc, $operationType);
}
return $rootValue;
}