class GraphQL::Dataloader::Request
See Source#request which returns an instance of this
Public Class Methods
Source
# File lib/graphql/dataloader/request.rb, line 7 def initialize(source, key) @source = source @key = key end
Public Instance Methods
Source
# File lib/graphql/dataloader/request.rb, line 20 def load @source.load(@key) end
Call this method to cause the current Fiber to wait for the results of this request.
Returns
-
Object— the object loaded forkey
# File lib/graphql/dataloader/request.rb, line 24 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