OptionalbatchOptionalbatchDefault see https://github.com/graphql/dataloader#batch-scheduling. A function to schedule the later execution of a batch. The function is expected to call the provided callback in the immediate future.
OptionalcacheDefault true. Set to false to disable memoization caching, creating a
new Promise and new key in the batchLoadFn for every load of the same
key. This is equivalent to setting cacheMap to null.
OptionalcacheDefault key => key. Produces cache key for a given load key. Useful
when keys are objects and two objects should be considered equivalent.
OptionalcacheDefault new Map(). Instance of Map (or an object with a similar API)
to be used as cache. May be set to null to disable caching.
OptionalmaxDefault Infinity. Limits the number of items that get passed in to the
batchLoadFn. May be set to 1 to disable batching.
OptionalnameThe name given to this DataLoader instance. Useful for APM tools.
Is null if not set in the constructor.
Default
true. Set tofalseto disable batching, invokingbatchLoadFnwith a single load key. This is equivalent to settingmaxBatchSizeto1.