diff --git a/lib/batch_loader/graphql.rb b/lib/batch_loader/graphql.rb index 372542b..2924caa 100644 --- a/lib/batch_loader/graphql.rb +++ b/lib/batch_loader/graphql.rb @@ -33,6 +33,8 @@ def self.instrument(type, field) end def self.wrap(batch_loader) + warn "DEPRECATION WARNING: using BatchLoader.for in GraphQL is deprecated. Use BatchLoader::GraphQL.for instead or return BatchLoader::GraphQL.wrap from your resolver." + BatchLoader::GraphQL.new.tap do |graphql| graphql.batch_loader = batch_loader end