From 7ff3e9399f90e05c0d6c002a240d2b1761296d92 Mon Sep 17 00:00:00 2001 From: Gilles Maes Date: Mon, 8 Oct 2018 15:53:07 +0200 Subject: [PATCH] =?UTF-8?q?Expand=20is=5Farray=20check=20in=20defaultTypeR?= =?UTF-8?q?esolver=20to=20allow=20for=20ArrayAccess=E2=80=A6=20(#361)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expand is_array check in defaultTypeResolver to allow for ArrayAccess objects as well --- src/Executor/Executor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 41d2eab..4567fa7 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -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']) ) {