lib/graphql/batch/setup_multiplex.rb in graphql-batch-0.5.3 vs lib/graphql/batch/setup_multiplex.rb in graphql-batch-0.5.4

- old
+ new

@@ -10,7 +10,21 @@ end def after_multiplex(multiplex) GraphQL::Batch::Executor.end_batch end + + module Trace + def initialize(executor_class:, **_rest) + @executor_class = executor_class + super + end + + def execute_multiplex(multiplex:) + GraphQL::Batch::Executor.start_batch(@executor_class) + super + ensure + GraphQL::Batch::Executor.end_batch + end + end end end