Updating DB: Edge functions or RPC?

Hi, I wanted to understand what's the best practice for choosing which method to update my database?

  1. Update database via edge function using supabase client directly
  2. Have the edge function invoke an RPC, passing in the payload to be updated
How do you guys decide which approach to take in different scenarios? For my use case, it's a simple use case of taking in form data, performing some logic checks in the edge function before updating it in my DB.

Thanks!
Was this page helpful?