lib/graphql/batch/mutation_execution_strategy.rb in graphql-batch-0.3.4 vs lib/graphql/batch/mutation_execution_strategy.rb in graphql-batch-0.3.5
- old
+ new
@@ -7,14 +7,16 @@
class FieldResolution < GraphQL::Batch::ExecutionStrategy::FieldResolution
def get_finished_value(raw_value)
strategy = execution_context.strategy
return super if strategy.enable_batching
+ GraphQL::Batch::Executor.current.clear
begin
strategy.enable_batching = true
strategy.deep_sync(Promise.sync(super))
ensure
strategy.enable_batching = false
+ GraphQL::Batch::Executor.current.clear
end
end
end
end
end