Skip to content

Commit 4be2acb

Browse files
author
Mikk Mihkel Nurges
committed
Merge branch 'release/v1.15.7'
2 parents e65e17d + 7a05692 commit 4be2acb

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Rebing/GraphQL/Support/SelectFields.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,10 @@ protected static function handleFields(array $requestedFields, $parentType, arra
122122

123123
// If field doesn't exist on definition we don't select it
124124
try {
125-
if ($parentType instanceof \GraphQL\Type\Definition\ListOfType) {
126-
continue;
127-
} elseif ($parentType instanceof \GraphQL\Type\Definition\UnionType) {
128-
continue;
129-
} else {
125+
if(method_exists($parentType, 'getField')) {
130126
$fieldObject = $parentType->getField($key);
127+
} else {
128+
continue;
131129
}
132130
} catch (InvariantViolation $e) {
133131
continue;

0 commit comments

Comments
 (0)