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
Name | Type |
---|---|
DataModel | extends GenericDataModel |
Properties
db
• db: GenericDatabaseWriter
<DataModel
>
A utility for reading and writing data in the database.
Defined in
auth
• auth: Auth
Information about the currently authenticated user.
Defined in
storage
• storage: StorageWriter
A utility for reading and writing files in storage.
Defined in
scheduler
• scheduler: Scheduler
A utility for scheduling Convex functions to run in the future.