Expand is_array check in defaultTypeResolver to allow for ArrayAccess… (#361)

Expand is_array check in defaultTypeResolver to allow for ArrayAccess objects as well
This commit is contained in:
Gilles Maes 2018-10-08 15:53:07 +02:00 committed by Vladimir Razuvaev
parent 1417a43697
commit 7ff3e9399f

View File

@ -1181,7 +1181,7 @@ class Executor
{
// First, look for `__typename`.
if ($value !== null &&
is_array($value) &&
(is_array($value) || $value instanceof ArrayAccess) &&
isset($value['__typename']) &&
is_string($value['__typename'])
) {