Skip to main content

Function: include()

include<C>(...relations): (action) => Promise <Action<Awaited<C & ConsumeInclude> & object, object>>

Eager load the given relations for the current model definition. It accepts deep relations through dot notation. The new relations will be merged with the previous ones.

Type parameters

C extends object

Parameters

• ...relations: ArrayableVariadic <ModelRelationDotKey <InferConsumedModelOrInstance<C>>>

Returns

Function

Parameters

action: Action<C & ConsumeInclude>

Returns

Promise <Action<Awaited<C & ConsumeInclude> & object, object>>

Source

packages/core/src/actions/context/enhancers/include.ts:32