diff --git a/lib/batch_loader/graphql.rb b/lib/batch_loader/graphql.rb index da19bc3..a6e9ba6 100644 --- a/lib/batch_loader/graphql.rb +++ b/lib/batch_loader/graphql.rb @@ -37,6 +37,8 @@ def self.for(item) 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