import { v } from "convex/values";
import { MutationCtx } from "cvx/_generated/server"; // I have cvx path alias set up for convex directory.
type Args = { ... };
export const fooFn = async (ctx: MutationCtx, { ... }: Args) => { await ctx.db.insert("foo", {...}); };
export const fooMutation = { args: {...}, handler: fooFn };
import { v } from "convex/values";
import { MutationCtx } from "cvx/_generated/server"; // I have cvx path alias set up for convex directory.
type Args = { ... };
export const fooFn = async (ctx: MutationCtx, { ... }: Args) => { await ctx.db.insert("foo", {...}); };
export const fooMutation = { args: {...}, handler: fooFn };