Skip to main content

Interface: GenericMutationCtx<DataModel>

server.GenericMutationCtx

A set of services for use within Convex mutation functions.

The mutation context is passed as the first argument to any Convex mutation function run on the server.

If you're using code generation, use the MutationCtx type in convex/_generated/server.d.ts which is typed for your data model.

Type parameters

NameType
DataModelextends GenericDataModel

Properties

db

db: GenericDatabaseWriter<DataModel>

A utility for reading and writing data in the database.

Defined in

server/registration.ts:41


auth

auth: Auth

Information about the currently authenticated user.

Defined in

server/registration.ts:46


storage

storage: StorageWriter

A utility for reading and writing files in storage.

Defined in

server/registration.ts:51


scheduler

scheduler: Scheduler

A utility for scheduling Convex functions to run in the future.

Defined in

server/registration.ts:56