Skip to content

Commit b064389

Browse files
committed
Fix duplicate error registration
1 parent 5ec98d6 commit b064389

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/graphql/execution/batching/field_compatibility.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ def resolve_batch(frs, objects, context, kwargs)
112112
end
113113
rescue GraphQL::Error => err
114114
if err.respond_to?(:path=) # TODO sort out error hierarchy so I can match these without a respond_to check
115-
frs.add_graphql_error(err)
115+
err
116116
else
117117
raise
118118
end
119119
rescue StandardError => stderr
120120
begin
121121
context.query.handle_or_reraise(stderr)
122122
rescue GraphQL::ExecutionError => ex_err
123-
frs.add_graphql_error(ex_err)
123+
ex_err
124124
end
125125
end
126126
elsif objects.first.is_a?(Hash)

lib/graphql/execution/batching/field_resolve_step.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def sync(lazy)
138138
rescue GraphQL::UnauthorizedError => auth_err
139139
@runner.schema.unauthorized_object(auth_err)
140140
rescue GraphQL::ExecutionError => err
141-
add_graphql_error(err)
141+
err
142142
end
143143

144144
def call

0 commit comments

Comments
 (0)