Sha256: 6fbbc81bb1b221b0247d03568fddb73bfb96c70a01638211ffb8db96b2dbf9c9

Contents?: true

Size: 419 Bytes

Versions: 9

Compression:

Stored size: 419 Bytes

Contents

module GraphQL::Batch
  class SetupMultiplex
    def initialize(schema, executor_class:)
      @schema = schema
      @executor_class = executor_class
    end

    def before_multiplex(multiplex)
      Setup.start_batching(@executor_class)
    end

    def after_multiplex(multiplex)
      Setup.end_batching
    end

    def instrument(type, field)
      Setup.instrument_field(@schema, type, field)
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
graphql-batch-0.4.3 lib/graphql/batch/setup_multiplex.rb
graphql-batch-0.4.2 lib/graphql/batch/setup_multiplex.rb
graphql-batch-0.4.1 lib/graphql/batch/setup_multiplex.rb
graphql-batch-edge-0.4.0 lib/graphql/batch/setup_multiplex.rb
graphql-batch-0.4.0 lib/graphql/batch/setup_multiplex.rb
graphql-batch-0.3.10 lib/graphql/batch/setup_multiplex.rb
graphql-batch-0.3.9 lib/graphql/batch/setup_multiplex.rb
graphql-batch-0.3.8 lib/graphql/batch/setup_multiplex.rb
graphql-batch-0.3.7 lib/graphql/batch/setup_multiplex.rb