lib/graphql/batch.rb in graphql-batch-0.3.1 vs lib/graphql/batch.rb in graphql-batch-0.3.2
- old
+ new
@@ -17,9 +17,14 @@
ensure
GraphQL::Batch::Executor.current = nil
end
end
+ def self.use(schema_defn)
+ schema_defn.instrument(:query, GraphQL::Batch::Setup)
+ schema_defn.lazy_resolve(::Promise, :sync)
+ end
+
autoload :ExecutionStrategy, 'graphql/batch/execution_strategy'
autoload :MutationExecutionStrategy, 'graphql/batch/mutation_execution_strategy'
end
end