You are here

protected function DataProducerProxy::resolveUncached in GraphQL 8.4

Invoke the data producer directly.

Parameters

\Drupal\graphql\Plugin\DataProducerPluginInterface $plugin:

\Drupal\graphql\GraphQL\Execution\ResolveContext $context:

\Drupal\graphql\GraphQL\Execution\FieldContext $field:

Return value

mixed

2 calls to DataProducerProxy::resolveUncached()
DataProducerProxy::resolve in src/Plugin/GraphQL/DataProducer/DataProducerProxy.php
Resolve field value.
DataProducerProxy::resolveCached in src/Plugin/GraphQL/DataProducer/DataProducerProxy.php
Try to return a value from cache, otherwise invoke data producer.

File

src/Plugin/GraphQL/DataProducer/DataProducerProxy.php, line 237

Class

DataProducerProxy
A proxy class that lazy resolves data producers and has a result cache.

Namespace

Drupal\graphql\Plugin\GraphQL\DataProducer

Code

protected function resolveUncached(DataProducerPluginInterface $plugin, ResolveContext $context, FieldContext $field) {
  $output = $plugin
    ->resolveField($field);
  return DeferredUtility::applyFinally($output, function () use ($plugin, $field) {
    $field
      ->addCacheableDependency($plugin);
  });
}