6 declare(strict_types=1);
10 use GraphQL\Validator\DocumentValidator;
11 use GraphQL\Validator\Rules\DisableIntrospection;
12 use GraphQL\Validator\Rules\QueryDepth;
25 private $exceptionFormatter;
32 $this->exceptionFormatter = $exceptionFormatter;
49 array $variableValues =
null,
50 string $operationName =
null 52 if (!$this->exceptionFormatter->shouldShowDetail()) {
53 DocumentValidator::addRule(
new QueryDepth(10));
54 DocumentValidator::addRule(
new DisableIntrospection());
57 return \GraphQL\GraphQL::executeQuery(
65 $this->exceptionFormatter->shouldShowDetail() ?
66 \GraphQL\Error\Debug::INCLUDE_DEBUG_MESSAGE | \GraphQL\Error\Debug::INCLUDE_TRACE :
false
__construct(ExceptionFormatter $exceptionFormatter)
process(Schema $schema, string $source, ContextInterface $contextValue=null, array $variableValues=null, string $operationName=null)