Skip to content

Commit

Permalink
Fixed a bug with invalid depth for fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
peldax committed Sep 20, 2021
1 parent 9312daf commit 986a8be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MaxDepthModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ private function validateDepth(int $fieldDepth, \Graphpinator\Normalizer\Selecti
continue 2;
}

$this->validateDepth(++$fieldDepth, $currentFieldSet);
$nextDepth = $fieldDepth + 1;
$this->validateDepth($nextDepth, $currentFieldSet);

break;
case \Graphpinator\Normalizer\Selection\FragmentSpread::class:
Expand Down

0 comments on commit 986a8be

Please sign in to comment.