lib/graphql/batch.rb in graphql-batch-0.3.3 vs lib/graphql/batch.rb in graphql-batch-0.3.4
- old
+ new
@@ -18,11 +18,15 @@
GraphQL::Batch::Executor.current = nil
end
end
def self.use(schema_defn)
- schema_defn.instrument(:query, GraphQL::Batch::Setup)
+ if GraphQL::VERSION >= "1.6.0"
+ schema_defn.instrument(:multiplex, GraphQL::Batch::SetupMultiplex)
+ else
+ schema_defn.instrument(:query, GraphQL::Batch::Setup)
+ end
schema_defn.lazy_resolve(::Promise, :sync)
end
autoload :ExecutionStrategy, 'graphql/batch/execution_strategy'
autoload :MutationExecutionStrategy, 'graphql/batch/mutation_execution_strategy'
@@ -32,5 +36,6 @@
require_relative "batch/version"
require_relative "batch/loader"
require_relative "batch/executor"
require_relative "batch/promise"
require_relative "batch/setup"
+require_relative "batch/setup_multiplex"