Need help: I need some advice on best practices.
I need to call an external API and insert its response data into a table. This process will be triggered by several database functions.
So, I'm considering two options:
Option 1: Implement an edge function to call the external API and insert the data, then have the database functions invoke this edge function.
Option 2: Implement a database function that directly calls the external API.
Which option is considered best practice?
So, I'm considering two options:
Option 1: Implement an edge function to call the external API and insert the data, then have the database functions invoke this edge function.
Option 2: Implement a database function that directly calls the external API.
Which option is considered best practice?