GraphQL::DataLoader::Loader(O, K, V)
Inherits Reference < Object
Abstract base class for all loaders
The first type parameter O is the type of the objects passed to #load.
The second type parameter K is the type of keys for caching and determining uniqueness.
The third type parameter V is the type of values returned by the loader.
You will need to override fetch to provide the actual batch loading behavior.
If O differs from K you will also need to override #key_for.
Constants
VERSION = "0.1.0"
Constructors
You can use a custom cache by implementing Cache(K, V) and passing it here.
Instance methods
clear(object : O) : self
Sourceclear
Sourcekey_for(object : O) : K
Get the key for an object passed to #load.
Override this if O differs from K
prime(object : O, value : V) : self
Source