diff --git a/src/Type/Definition/ResolveInfo.php b/src/Type/Definition/ResolveInfo.php index 75c0070..782168d 100644 --- a/src/Type/Definition/ResolveInfo.php +++ b/src/Type/Definition/ResolveInfo.php @@ -136,10 +136,10 @@ class ResolveInfo if (isset($this->fragments[$spreadName])) { /** @var FragmentDefinitionNode $fragment */ $fragment = $this->fragments[$spreadName]; - $fields += $this->foldSelectionSet($fragment->selectionSet, $descend); + $fields = array_merge_recursive($this->foldSelectionSet($fragment->selectionSet, $descend), $fields); } } else if ($selectionNode instanceof InlineFragmentNode) { - $fields += $this->foldSelectionSet($selectionNode->selectionSet, $descend); + $fields = array_merge_recursive($this->foldSelectionSet($selectionNode->selectionSet, $descend), $fields); } }