Allow user to customize update+update merge #1038
frederikaalund
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The existing mutation merging works really well already. I'd like to build on top of it.
Specifically, I'd like to have an
update+updatethat results in removed. Consider this sequence of events:name = "fred"name = "ben"name = "fred"Overall, the changes cancel each other out. In other words:
update+updateresults in no change at all.I don't expect TanStack DB to deal with this case in general. Instead, I propose an addition to the API that allows the user to customize the
update+updatecase. This way, it's up to the user to implement it properly.Any thoughts on this?
Beta Was this translation helpful? Give feedback.
All reactions