From 285de89f859f17b8c5388fa87a34f51ddb7d89c7 Mon Sep 17 00:00:00 2001 From: Aaron Carlino Date: Wed, 18 Aug 2021 14:32:24 +1200 Subject: [PATCH] BUGFIX: hasWarapper allows nested types --- src/Schema/Type/TypeReference.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Schema/Type/TypeReference.php b/src/Schema/Type/TypeReference.php index b2798ef66..fc1fac127 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); } /**