HiramH
Convex Community8mo ago
5 replies
Hiram

Idempotency

I’m looking for any recommended ways to implement “idempotent mutations” with Convex.

For instance, in MySQL, idempotency can be achieved using a unique constraint on a column. Similarly, in Temporal, it can be achieved using a workflow ID.

Could I implement it by using the .unique() query to throw an error and fail the transaction? Are there any potential pitfalls I should be aware of? Thanks in advance!
Was this page helpful?