lib/graphql/dataloader/request.rb in graphql-2.2.6 vs lib/graphql/dataloader/request.rb in graphql-2.2.7
- old
+ new
@@ -12,8 +12,13 @@
#
# @return [Object] the object loaded for `key`
def load
@source.load(@key)
end
+
+ def load_with_deprecation_warning
+ warn("Returning `.request(...)` from GraphQL::Dataloader is deprecated, use `.load(...)` instead. (See usage of #{@source} with #{@key.inspect}).")
+ load
+ end
end
end
end