lib/graphql/batch/setup.rb in graphql-batch-0.3.8 vs lib/graphql/batch/setup.rb in graphql-batch-0.3.9
- old
+ new
@@ -1,14 +1,13 @@
module GraphQL::Batch
class Setup
class << self
def start_batching(executor_class)
- raise NestedError if GraphQL::Batch::Executor.current
- GraphQL::Batch::Executor.current = executor_class.new
+ GraphQL::Batch::Executor.start_batch(executor_class)
end
def end_batching
- GraphQL::Batch::Executor.current = nil
+ GraphQL::Batch::Executor.end_batch
end
def instrument_field(schema, type, field)
return field unless type == schema.mutation
old_resolve_proc = field.resolve_proc