We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc4b990 commit e7cde5eCopy full SHA for e7cde5e
src/Validator/Rules/QueryComplexity.php
@@ -94,7 +94,9 @@ public function __invoke(ValidationContext $context)
94
},
95
NodeKind::OPERATION_DEFINITION => [
96
'leave' => function (OperationDefinitionNode $operationDefinition) use ($context, &$complexity) {
97
- if (empty($context->getErrors())) {
+ $errors = $context->getErrors();
98
+
99
+ if (empty($errors)) {
100
$complexity = $this->fieldComplexity($operationDefinition, $complexity);
101
102
if ($complexity > $this->getMaxQueryComplexity()) {
0 commit comments