for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Youshido\GraphQL\Execution\ErrorHandler\Plugin;
use Psr\Log\LoggerInterface;
use Youshido\GraphQL\Execution\Context\ExecutionContext;
use Youshido\GraphQL\Execution\ErrorHandler\ErrorHandlerMiddlewareInterface;
class Logger implements ErrorHandlerMiddlewareInterface
{
/** @var LoggerInterface */
private $logger;
public function __construct(LoggerInterface $logger)
$this->logger = $logger;
}
public function execute($error, ExecutionContext $executionContext, callable $next)
$this->logger->error($error);
return $next($next, $executionContext);