
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
- Cannot find module failure
Sorry, Newbe question here. I just installed Appwrite and am trying to install my first Function an am having absolutely no luck what-so-ever getting this done...
- Can't push functions when self-hosting o...
Hello, I'm a bit new to appwrite functions and recently hosted a fresh 1.7.4 on my portainer setup. Tried to create a new function and when trying to push it I ...
- Internal curl errors has occurred within...
