lib/graphql/execution/execute.rb in graphql-1.9.10 vs lib/graphql/execution/execute.rb in graphql-1.9.11
- old
+ new
@@ -195,10 +195,10 @@
when GraphQL::ExecutionError
raw_value.ast_node ||= field_ctx.ast_node
raw_value.path = field_ctx.path
query.context.errors.push(raw_value)
when Array
- if !field_type.list?
+ if field_type.non_null?
# List type errors are handled above, this is for the case of fields returning an array of errors
list_errors = raw_value.each_with_index.select { |value, _| value.is_a?(GraphQL::ExecutionError) }
if list_errors.any?
list_errors.each do |error, index|
error.ast_node = field_ctx.ast_node