Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .changeset/custom-mutation-builder.md

This file was deleted.

31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# better-auth-convex

## 0.4.2

### Patch Changes

- df53a30: Add support for custom mutation builders in `createClient` and `createApi`. Both functions now accept an optional `internalMutation` parameter, allowing you to wrap internal mutations with custom context (e.g., triggers, aggregates, middleware).

**Usage:**

```ts
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,
});
```

## 0.4.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "better-auth-convex",
"version": "0.4.1",
"version": "0.4.2",
"description": "Better Auth Convex local integration",
"keywords": [
"convex",
Expand Down