How to insert to multiple tables in one request?

Hi I am making a todo list and I have tables for Tasks, Tags, and TagsToTasks. Is there a built in way with the rest api that I can POST a new task that has tags? To do this I will need to insert on the Tasks table and TagsToTasks table. I am hoping to avoid a situation where client first makes a POST request to Tasks and then to TagsToTasks after since then I would probably need to have a transaction to handle rollback. Is this something I should use an edge function for?
Was this page helpful?