Updated listOfType validation to Traversable

This commit is contained in:
David Mongeau-Petitpas 2015-08-09 19:00:05 -04:00
parent 7431f2dcc5
commit b3932c8fbe

View File

@ -430,7 +430,7 @@ class Executor
if ($fieldType instanceof ListOfType) { if ($fieldType instanceof ListOfType) {
$itemType = $fieldType->getWrappedType(); $itemType = $fieldType->getWrappedType();
Utils::invariant( Utils::invariant(
is_array($result) || $result instanceof \ArrayAccess, is_array($result) || $result instanceof \Traversable,
'User Error: expected iterable, but did not find one.' 'User Error: expected iterable, but did not find one.'
); );