Skip to content

Commit

Permalink
Merge 522e1cf into 195ff52
Browse files Browse the repository at this point in the history
  • Loading branch information
jotwea committed Apr 15, 2024
2 parents 195ff52 + 522e1cf commit c831355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GraphQl/State/Provider/ResolverProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private function getResourceClass(?object $item, ?string $resourceClass, string
return $itemClass;
}

if ($resourceClass !== $itemClass) {
if ($resourceClass !== $itemClass && !$item instanceof $resourceClass) {
throw new \UnexpectedValueException(sprintf($errorMessage, (new \ReflectionClass($resourceClass))->getShortName(), (new \ReflectionClass($itemClass))->getShortName()));
}

Expand Down

0 comments on commit c831355

Please sign in to comment.