vectorV
Convex Community2y ago
29 replies
vector

Sending a function as an argument to a function

yeah, I have these helpers in javascript, mainly generated to make it less syntactically heavy to generate backend functions.

The above is a little bit more different. Essentially, I want to be writing all my database functions on the front end so I (theoritically) dont need to design custom calls for each new query I want to make. So the idea was to pass down a custom function that has the filtering and ordering built out on the front end already as a function that takes in a ctx and have it run that function on the back end. I assumed this was very security prone and Im wondering if thats correct.

Regardless, my current system does things more traditionally and creates the backend query endpoints separately for each use case.
Was this page helpful?