We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
somethings like this I will make the PR
<?php declare(strict_types=1); namespace Overblog\GraphQLBundle\EventListener; use Overblog\GraphQLBundle\Error\ErrorHandler; use Overblog\GraphQLBundle\Event\ExecutorResultEvent; use Psr\Log\LoggerInterface; final class ErrorHandlerListener { /** @var ErrorHandler */ private $errorHandler; /** @var bool */ private $throwException; /** @var bool */ private $debug; /** @var LoggerInterface */ private $logger; public function __construct( ErrorHandler $errorHandler, LoggerInterface $logger, bool $throwException = false, bool $debug = false ) { $this->errorHandler = $errorHandler; $this->throwException = $throwException; $this->debug = $debug; $this->logger = $logger; } public function onPostExecutor(ExecutorResultEvent $executorResultEvent): void { $result = $executorResultEvent->getResult(); $this->errorHandler->handleErrors($result, $this->throwException, $this->debug); $result = $result->toArray(); if (isset($result['errors'])) { $this->logger->error(__METHOD__.' : '.\json_encode($result['errors'])); } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
somethings like this
I will make the PR
The text was updated successfully, but these errors were encountered: