Skip to content

GetClientArgs

Defined in: packages/react/src/collections/api/get/client.ts:18

Client-side args for get. Extends GenericQueryClientParams to inherit ctx?: never, populate?: TPopulate, and depth?: D.

TCollectionSlug extends CollectionSlug

Collection slug, recovered from the Id brand.

TPopulate extends PopulateShape<TCollectionSlug>

Populate object.

D extends number = 0

Depth literal (0 = none). Inferred from depth.

optional auth?: undefined

Defined in: packages/core/src/collections/api/types.ts:88

Discriminator: client args MUST NOT supply auth.

GenericQueryClientParams.auth


collection: TCollectionSlug

Defined in: packages/react/src/collections/api/get/client.ts:24


optional ctx?: undefined

Defined in: packages/core/src/collections/api/types.ts:90

Discriminator: client args MUST NOT supply ctx.

GenericQueryClientParams.ctx


optional depth?: D

Defined in: packages/core/src/collections/api/types.ts:104

Auto-populate all relationship fields to this many levels.

Inferred as the literal D so a wrapper that threads D through to its return type narrows accordingly (depth: 2 → depth-populated doc). A non-literal number degrades to VexDocument via DepthPopulated’s guard. D defaults to number, so wrappers that do not thread it keep the plain passthrough they had before.

Use populate for documented consumer code; depth is internal.

GenericQueryClientParams.depth


optional drafts?: boolean

Defined in: packages/core/src/collections/api/types.ts:116

When true on a versioned collection, includes the document’s draft row alongside its published row — gated server-side on the readDrafts action (Step 13). Ignored for a non-versioned collection.

GenericQueryClientParams.drafts


id: Id<TCollectionSlug>

Defined in: packages/react/src/collections/api/get/client.ts:23


optional populate?: TPopulate

Defined in: packages/core/src/collections/api/types.ts:92

Recursive populate object, type-narrowed against RelationshipKeysOf<TCollectionSlug>.

GenericQueryClientParams.populate


optional skip?: boolean

Defined in: packages/core/src/collections/api/types.ts:110

When true, the wrapper passes convexQuery’s "skip" sentinel instead of args, so the query is not issued. Use for conditional queries (e.g. an id that is not known yet) without violating the Rules of Hooks.

GenericQueryClientParams.skip