Skip to content

GetServerArgs

Defined in: packages/core/src/api/get/server.ts:22

Server-side args for get.

Inherits ctx, populate, depth, and config (with mutual-exclusion constraints) from GenericQueryServerParams.

DataModel extends GenericDataModel

The Convex data model (inferred from ctx).

TCollectionSlug extends CollectionSlug

Collection slug.

TPopulate extends PopulateShape<TCollectionSlug>

Populate object.

D extends number = 0

Depth literal (0 = no depth, default).

optional access?: AccessCallOptions<QueryCallAction>

Defined in: packages/core/src/api/types.ts:216

Per-call access overrides.

AccessCallOptions

GenericQueryServerParams.access


optional auth?: VexApiAuth

Defined in: packages/core/src/api/types.ts:223

The auth config of the current user making the query.

{ user: {...}, organization: {...} }

GenericQueryServerParams.auth


collection: TCollectionSlug

Defined in: packages/core/src/api/get/server.ts:31

The collection slug to patch this document.


optional config?: [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.

GenericQueryServerParams.config


ctx: GenericQueryCtx<DataModel>

Defined in: packages/core/src/api/types.ts:225

Discriminator: server args MUST supply a Convex query context.

GenericQueryServerParams.ctx


optional depth?: [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.

GenericQueryServerParams.depth


id: Id<TCollectionSlug>

Defined in: packages/core/src/api/get/server.ts:29

The document ID to fetch.


optional populate?: [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.

GenericQueryServerParams.populate