Skip to content

Commit

Permalink
BUGFIX: hasWarapper allows nested types
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Carlino committed Aug 18, 2021
1 parent 8a3e5be commit 285de89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Schema/Type/TypeReference.php
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 285de89

Please sign in to comment.