You are here

public static function OperationLanguageNegotiation::setContext in GraphQL 8.4

Set the current resolve context statically which contains the language.

Parameters

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

2 calls to OperationLanguageNegotiation::setContext()
OperationSubscriber::onAfterOperation in src/EventSubscriber/OperationSubscriber.php
Handle operation end events.
OperationSubscriber::onBeforeOperation in src/EventSubscriber/OperationSubscriber.php
Handle operation start events.

File

src/Plugin/LanguageNegotiation/OperationLanguageNegotiation.php, line 56

Class

OperationLanguageNegotiation
Class for identifying language based on a graphql query.

Namespace

Drupal\graphql\Plugin\LanguageNegotiation

Code

public static function setContext(ResolveContext $context = NULL) : void {
  static::$context = $context;
}