Supplying child rows of deleted row to Database Webhook
Hi,
I have two tables:
I created a Database Webhook that triggers an HTTP request to a Supabase Edge Function whenever a DELETE query is run on
In my Supabase Edge Function though, I only see the now deleted
Is there a way for me to supply not just the
{
id: "123",
children: [
{ id: "234" }, { id: "345" }, { id: "456" }
]
}
?
I have two tables:
parents and children. One parent can have many children and each child is assigned to a parent through a parent_id column.I created a Database Webhook that triggers an HTTP request to a Supabase Edge Function whenever a DELETE query is run on
parents. Through a cascading delete, this delete query also deletes all children of that parent.In my Supabase Edge Function though, I only see the now deleted
parent row as the payload.Is there a way for me to supply not just the
parent row but also its now-deleted children rows as well? So that the old_record supplied to my function would look something like this:{
id: "123",
children: [
{ id: "234" }, { id: "345" }, { id: "456" }
]
}
?