lib/graphql/batch.rb in graphql-batch-0.3.0 vs lib/graphql/batch.rb in graphql-batch-0.3.1

- old
+ new

@@ -1,6 +1,9 @@ require "graphql" +if Gem::Version.new(GraphQL::VERSION) < Gem::Version.new("1.3") + warn "graphql gem versions less than 1.3 are deprecated for use with graphql-batch, upgrade so lazy_resolve can be used" +end require "promise.rb" module GraphQL module Batch BrokenPromiseError = ::Promise::BrokenError @@ -13,19 +16,16 @@ Promise.sync(yield) ensure GraphQL::Batch::Executor.current = nil end end + + autoload :ExecutionStrategy, 'graphql/batch/execution_strategy' + autoload :MutationExecutionStrategy, 'graphql/batch/mutation_execution_strategy' end end require_relative "batch/version" require_relative "batch/loader" require_relative "batch/executor" require_relative "batch/promise" require_relative "batch/setup" - -# Allow custom execution strategies to be removed upstream -if defined?(GraphQL::Query::SerialExecution) - require_relative "batch/execution_strategy" - require_relative "batch/mutation_execution_strategy" -end