public function OperationSubscriber::onAfterOperation in GraphQL 8.4
Handle operation end events.
Parameters
\Drupal\graphql\Event\OperationEvent $event: The kernel event object.
File
- src/
EventSubscriber/ OperationSubscriber.php, line 65
Class
- OperationSubscriber
- Sets the language before/after a GraphQL operation.
Namespace
Drupal\graphql\EventSubscriberCode
public function onAfterOperation(OperationEvent $event) : void {
if ($this->moduleHandler
->moduleExists('language') && !empty($this->languageNegotiator)) {
OperationLanguageNegotiation::setContext($event
->getContext());
}
$this
->resetLanguageContext();
}