Automattic\WooCommerce\Vendor\GraphQL\Server

Helper::resolveContextValue │ protected │ WC 1.0

Method of the class: Helper{}

No Hooks.

Returns

mixed. user defined

Usage

// protected - for code of main (parent) or child class
$result = $this->resolveContextValue( $config, $params, $doc, $operationType );
$config(ServerConfig) (required)
.
$params(OperationParams) (required)
.
$doc(DocumentNode) (required)
.
$operationType(string) (required)
.

Helper::resolveContextValue() code WC 11.1.2

protected function resolveContextValue(
    ServerConfig $config,
    OperationParams $params,
    DocumentNode $doc,
    string $operationType
) {
    $context = $config->getContext();

    if (is_callable($context)) {
        $context = $context($params, $doc, $operationType);
    }

    return $context;
}