Skip to content

Commit

Permalink
Fixed bug with null list value
Browse files Browse the repository at this point in the history
  • Loading branch information
peldax committed Jan 4, 2021
1 parent 2f46fd3 commit 7aa7850
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Type/ListType.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public function resolve(
foreach ($parentResult->getRawValue() as $rawValue) {
$value = $this->innerType->createResolvedValue($rawValue);

$return[] = $value->getType()->resolve($requestedFields, $value);
$return[] = $value instanceof \Graphpinator\Value\NullValue
? $value
: $value->getType()->resolve($requestedFields, $value);
}

return new \Graphpinator\Value\ListResolvedValue($this, $return);
Expand Down

0 comments on commit 7aa7850

Please sign in to comment.