class GraphQL::Batch::SetupMultiplex

Public Class Methods

new(schema, executor_class:) click to toggle source
# File lib/graphql/batch/setup_multiplex.rb, line 3
def initialize(schema, executor_class:)
  @schema = schema
  @executor_class = executor_class
end

Public Instance Methods

after_multiplex(multiplex) click to toggle source
# File lib/graphql/batch/setup_multiplex.rb, line 12
def after_multiplex(multiplex)
  GraphQL::Batch::Executor.end_batch
end
before_multiplex(multiplex) click to toggle source
# File lib/graphql/batch/setup_multiplex.rb, line 8
def before_multiplex(multiplex)
  GraphQL::Batch::Executor.start_batch(@executor_class)
end