You are here

public function DataProducerProxy::map in GraphQL 8.4

Store a resolver for a given name.

Parameters

string $name:

\Drupal\graphql\GraphQL\Resolver\ResolverInterface $mapping:

Return value

$this

File

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

Class

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

Namespace

Drupal\graphql\Plugin\GraphQL\DataProducer

Code

public function map($name, ResolverInterface $mapping) {
  $this->mapping[$name] = $mapping;
  return $this;
}