-
Notifications
You must be signed in to change notification settings - Fork 167
add missing link to mutations doc in config #632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Pull mutation off mutations array for cleaner code - Add comment explaining collection handlers only receive one mutation at a time - Apply pattern consistently across all handler examples π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove incorrect comment about single mutations - Update handlers to use Promise.all for multiple mutations - Fix collection.refetch() -> collection.utils.refetch() - Update Electric collection pattern to return txids - Add note about automatic refetch in collection handlers π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Parenthesize the offset to ensure negative IDs: -(Math.floor(...) + 1) Previously could produce positive 1 when Math.random() returns 0
Use 'Immer-like pattern' instead of 'uses Immer under the hood'
- Correct handler params to { transaction, collection }
- Remove incorrect metadata parameter from signature
- Add metadata to mutation object properties list
- Fix return type to Promise<any> | any
Replace QueryCollection-specific note with general requirement that handlers must wait for server changes to sync back before resolving
Collection handlers automatically handle refetch, only custom actions need it
- Make mutationFn required (not optional) - Add missing id and metadata options - Mark autoCommit as optional
Note that rollback is automatic on error, manual rollback only needed for user actions like canceling a form
- Replace opening paragraph with bullet points - Remove worked examples, keep truth table only - Remove redundant benefits list
|
|
Size Change: 0 B Total Size: 74.1 kB βΉοΈ View Unchanged
|
|
Size Change: 0 B Total Size: 1.44 kB βΉοΈ View Unchanged
|
π― Changes
β Checklist
pnpm test:pr.π Release Impact