@morojs/moro / createDataLoader
Function: createDataLoader()
createDataLoader<
K,V>(batchFn,options):Promise<any>
Defined in: src/core/middleware/built-in/graphql/helpers.ts:220
DataLoader helper for batching Prevents N+1 query problems
Type Parameters
K
K
V
V
Parameters
batchFn
(keys) => Promise<(Error | V)[]>
options
batch?
boolean
cache?
boolean
maxBatchSize?
number
Returns
Promise<any>