Ning Kuang
CCConvex Community
•Created by Ning Kuang on 10/2/2024 in #support-community
Best practice to store "callbacks" in database?
For example, let's say I have a JS interface for game achievement:
What is the best practice to represent this in Convex DB? Or in any DB?
My thought is to store reference to a query function (in my code) in
isCriteriaMet
field; store reference to a mutation function in reward
field. Or maybe just references to helper functions with context?
If implemented this way, is there a Convex internal API where I can sync the list of query/mutation functions I defined in my code to the Convex DB, so I can safely reference them in another table?4 replies