Class: GraphQL::Dataloader::Request
- Inherits:
-
Object
- Object
- GraphQL::Dataloader::Request
- Defined in:
- lib/graphql/dataloader/request.rb
Overview
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(source, key) ⇒ Request
constructor
A new instance of Request.
-
#load ⇒ Object
Call this method to cause the current Fiber to wait for the results of this request.
Constructor Details
#initialize(source, key) ⇒ Request
Returns a new instance of Request.
6 7 8 9 |
# File 'lib/graphql/dataloader/request.rb', line 6 def initialize(source, key) @source = source @key = key end |
Instance Method Details
#load ⇒ Object
Call this method to cause the current Fiber to wait for the results of this request.
14 15 16 |
# File 'lib/graphql/dataloader/request.rb', line 14 def load @source.load(@key) end |