LogoRobo.js
Framework

resolveIncludesBatched()

Function: resolveIncludesBatched()

function resolveIncludesBatched<T>(
   records, 
   includeClause, 
   schema, 
   modelName, 
ctx): Promise<T & Record<string, unknown>[]>

Resolve includes for multiple records with batching (N+1 prevention).

Type Parameters

Type Parameter
T extends { id: string; }

Parameters

ParameterTypeDescription
recordsT[]Records to resolve includes for
includeClauseIncludeClauseInclude clause
schemaNormalizedSchemaModel's normalized schema
modelNamestringModel name
ctxIncludeContextInclude context

Returns

Promise<T & Record<string, unknown>[]>

Records with resolved includes

On this page