API Reference
interfaces
Includemap

@coasys/ad4m / Exports / IncludeMap

Interface: IncludeMap

Describes which relations to eager-load when querying.

Each value is either:

  • true — hydrate the relation one level deep
  • A RelationSubQuery — scoped sub-query (filter / sort / paginate / nested include)

Example

// One level deep
{ comments: true }
 
// Sub-query: only the 5 most-recent comments
{ comments: { order: { createdAt: 'DESC' }, limit: 5 } }
 
// Nested eager-load
{ comments: { include: { author: true } } }

Indexable

▪ [relation: string]: boolean | RelationSubQuery