diff --git a/src/Schema/Type/TypeReference.php b/src/Schema/Type/TypeReference.php index b2798ef6..fc1fac12 100644 --- a/src/Schema/Type/TypeReference.php +++ b/src/Schema/Type/TypeReference.php @@ -80,8 +80,10 @@ private function hasWrapper(string $nodeKind): bool if (empty($path)) { return false; } + // Remove the named type + array_pop($path); - return $path[0] === $nodeKind; + return in_array($nodeKind, $path); } /**