public function SubrequestSubscriber::onKernelRequestFinished in GraphQL 8.4
Handle kernel request finished events.
Parameters
\Symfony\Component\HttpKernel\Event\FinishRequestEvent $event: The kernel event object.
File
- src/
EventSubscriber/ SubrequestSubscriber.php, line 58
Class
- SubrequestSubscriber
- Sets the language on subrequests.
Namespace
Drupal\graphql\EventSubscriberCode
public function onKernelRequestFinished(FinishRequestEvent $event) : void {
$request = $event
->getRequest();
if (!$request->attributes
->has('_graphql_subrequest')) {
return;
}
$this
->resetLanguageContext();
}