You are here

public function ContextRepository::addContextProvider in GraphQL 8.3

Add a context provider.

Parameters

\Drupal\Core\Plugin\Context\ContextProviderInterface $contextProvider: The context provider to add.

File

src/GraphQL/Context/ContextRepository.php, line 29

Class

ContextRepository
Non-lazy un-optimized context repository.

Namespace

Drupal\graphql\GraphQL\Context

Code

public function addContextProvider(ContextProviderInterface $contextProvider) {
  $this->contextProviders[] = $contextProvider;
}