Patch Changes
-
df53a30: Add support for custom mutation builders in
createClientandcreateApi. Both functions now accept an optionalinternalMutationparameter, allowing you to wrap internal mutations with custom context (e.g., triggers, aggregates, middleware).Usage:
const internalMutation = customMutation( internalMutationGeneric, customCtx(async (ctx) => ({ db: triggers.wrapDB(ctx).db, })) ); // Pass to createClient createClient({ authFunctions, schema, internalMutation, triggers, }); // Pass to createApi createApi(schema, { ...auth.options, internalMutation, });