If I want to validate the data users can put in the database I have to use functions. Is there a better way to do data validation then initiating ZOD in every single function and adding a schema for every function individually? I also believe that this could waste a lot of resources.
Hey đź‘‹ For simpler maintenance, I would have 1 function with multiple endpoints. This makes your function's code larger, but with use of some framework, it should be very readable when split across multiple files.
If next iteration of functions goes well (performance-focused), I will pitch idea of .before and .after events. Before events would run syncoronously, and could allow/deny the action - for example document creation. For now, best approach is to execute function from client, and create document inside function
What do you mean by „multiple endpoints“?
This would be insane! Love the idea 🤩
Recommended threads
- Feedback and Deployment Challenges with ...
Hello world!, I've been developing a project using FastAPI in Python, and I was considering deploying it through Appwrite Functions. However, I encountered a f...
- Bulk feature status
Hi there, I am using version 1.7.4 self hosted and wanted to use the bulk operations in a dart function. I saw that in the dart_appwrite sdk version 16.1.0 it ...
- CORS preflight returns 500 on Dart funct...
Hey everyone 👋 I’m running a Dart cloud function, Every time I respond to a preflight (OPTIONS) request, I get a 500 internal error, and the logs show: ```NoSu...