How to empty an optional field in the table?
This is my schema and I want to empty the chat field when this mutation is called.
I cannot initialise null to it since I am getting validation error, so how can I achieve this?
5 Replies
await ctx.db.patch(args.chatId, {chat: undefined})
Writing Data | Convex Developer Hub
Mutations can insert, update, and
Ah, I missed that.
Anyway, thanks @Michal Srb
Also from the dashboard you can try out the bulk edit feature, setting the patch to be undefined for that field hopefully works
Yeah it did work.