Add 'WHEN' Condition for UPDATE Webhooks in UI #36447
Unanswered
sebasbeleno
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently, when creating a database webhook for UPDATE events through the Supabase UI, there isn't an option to specify a conditional WHEN clause.
This limitation causes an issue when an Edge Function is triggered by a row update and subsequently modifies a column in that same row. This modification re-triggers the UPDATE webhook, leading to an infinite loop or unnecessary function executions.
While it's possible to add a WHEN clause using SQL to prevent this (e.g., WHEN (old.* IS DISTINCT FROM new.*) on specific columns), this functionality is missing from the dashboard UI
All reactions