Skip to content

Commit 646d2a9

Browse files
committed
Better error for GraphQLList
Related GraphQL-js commit: graphql/graphql-js@a0eef4b
1 parent 695c228 commit 646d2a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graphql/core/execution/executor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ def complete_value(self, ctx, return_type, field_asts, info, result):
252252
# If field type is List, complete each item in the list with the inner type
253253
if isinstance(return_type, GraphQLList):
254254
assert isinstance(result, collections.Iterable), \
255-
'User Error: expected iterable, but did not find one.'
255+
('User Error: expected iterable, but did not find one' +
256+
'for field {}.{}').format(info.parent_type, info.field_name)
256257

257258
item_type = return_type.of_type
258259
completed_results = []

0 commit comments

Comments
 (0)