CashedC
Convex Community7mo ago
3 replies
Cashed

Anyone have a good solution for

Anyone have a good solution for optimistic updates and having temporary IDs that conflict with the actual convex ID?

For example, I am adding messages to my chat app optimistically and for each message I have a query that takes in that ID to fetch the reactions of the message. Obviously when I optimistically add a message with a fake uuid convex complains since it's querying something that doesn't exist (yet)

8/13/2025, 8:45:03 PM [CONVEX Q(reactions:listByMessage)] ArgumentValidationError: Value does not match validator.
Path: .messageId
Value: "73b9f060-f13e-42a0-a75e-f1ea3a2aa6bb"
Validator: v.id("messages")


Is this something to worry about or fix?
Was this page helpful?