Method: GraphQL::Dataloader::Source#setup
- Defined in:
- lib/graphql/dataloader/source.rb
#setup(dataloader) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Called by GraphQL::Dataloader to prepare the GraphQL::Dataloader::Source's internal state
8 9 10 11 12 13 14 15 16 |
# File 'lib/graphql/dataloader/source.rb', line 8 def setup(dataloader) # These keys have been requested but haven't been fetched yet @pending = {} # These keys have been passed to `fetch` but haven't been finished yet @fetching = {} # { key => result } @results = {} @dataloader = dataloader end |