Best practices for writing DB queries/mutations
My understanding is that every mutation/query/action/http endpoints that I write is exposed to the world, and it's my job to write the logic inside the handler to prevent actions from malicious users?
I currently have a mutation like so:
I want to use this mutation both inside an HTTP function that is triggered via webhooks from Clerk, and also inside the webapp for authenticated users.
What would be the best way to secure such mutations that are shared between webhooks and user sessions?
