GenericQueryServerParams
Defined in: packages/core/src/api/types.ts:209
Base shape for server-side args of a vex.* query function.
Carries ctx, populate, depth, and config. populate and depth
are mutually exclusive — TypeScript enforces this via conditional constraints:
populate becomes never when D ≠ 0; depth and config become never
when TPopulate is non-empty. Passing both is a compile error at the call site.
All three query functions (find, get, search) extend this base and
inherit these constraints without re-declaring them.
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”DataModel
Section titled “DataModel”DataModel extends GenericDataModel = GenericDataModel
The Convex data model (inferred from ctx).
TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends CollectionSlug = CollectionSlug
The collection slug.
TPopulate
Section titled “TPopulate”TPopulate extends PopulateShape<TCollectionSlug> = Record<string, never>
The populate object.
D extends number = 0
Depth literal (0 = no depth, default). Captured as a literal
via const D extends number = 0 on the implementing function.
Properties
Section titled “Properties”access?
Section titled “access?”
optionalaccess?:AccessCallOptions<QueryCallAction>
Defined in: packages/core/src/api/types.ts:216
Per-call access overrides.
optionalauth?:VexApiAuth
Defined in: packages/core/src/api/types.ts:223
The auth config of the current user making the query.
Example
Section titled “Example”{ user: {...}, organization: {...} }config?
Section titled “config?”
optionalconfig?: [TPopulate] extends [Record<string,never>] ?VexConfig:never
Defined in: packages/core/src/api/types.ts:241
The resolved VexConfig. Required alongside depth; passed
from the queryApi factory closure so the Convex handler has schema info.
ctx:
GenericQueryCtx<DataModel>
Defined in: packages/core/src/api/types.ts:225
Discriminator: server args MUST supply a Convex query context.
depth?
Section titled “depth?”
optionaldepth?: [TPopulate] extends [Record<string,never>] ?D:never
Defined in: packages/core/src/api/types.ts:236
Auto-populate all relationship fields to this many levels.
Becomes never when TPopulate is non-empty. Use populate for
consumer-facing code; this is an internal escape hatch for CollectionListView.
populate?
Section titled “populate?”
optionalpopulate?: [D] extends [0] ?TPopulate:never
Defined in: packages/core/src/api/types.ts:230
Recursive populate object, type-narrowed against RelationshipKeysOf<TCollectionSlug>.
Mutually exclusive with depth — becomes never when D ≠ 0.