mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 04:46:04 +03:00
Merge pull request #1 from Folkloreatelier/master
Check ListOfType result is an instance of Traversable instead of ArrayObject
This commit is contained in:
commit
04b2e409eb
@ -285,7 +285,7 @@ class Executor
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements the logic to compute the key of a given field’s entry
|
||||
* Implements the logic to compute the key of a given fields entry
|
||||
*/
|
||||
private static function getFieldEntryKey(Field $node)
|
||||
{
|
||||
@ -430,7 +430,7 @@ class Executor
|
||||
if ($fieldType instanceof ListOfType) {
|
||||
$itemType = $fieldType->getWrappedType();
|
||||
Utils::invariant(
|
||||
is_array($result) || $result instanceof \ArrayObject,
|
||||
is_array($result) || $result instanceof \Traversable,
|
||||
'User Error: expected iterable, but did not find one.'
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user