When I setup a function that gets called by a document.create does this function intercept the creation of the document and I have to create it myself with the given payload or how does that work?
nope, function doesn't intercept, function get trigger once doc successfully get created...
yap, if you want to prevent user from creating Doc directly, you can use the function where user pass the Data
Thatβs bad π It would be soooo easy
Yeah thatβs exactly what I donβt want to do haha
I mean, yaa but as Function act as Serverless so in that sense it's not possible...
Yeah makes sense π«
can understand but, for security is concern so that's ideal approach
Oke thx ππ» Have a nice day!
no prob you too π
Oh another quick question π Do you think itβs faster to make standalone functions for stuff I need to check on every execution or should I just paste this code in every function?
Hope you understand what I mean
it's generally idea to have seperate function, not just that it will faster ( I mean relative faster not compareabily) , but also another reason to have smaller function is to seperate area of concern
so, if one function have bug another function still will work and user don't have to wait for issue for that function to be fixed
True
Will the functions automatically get called locally? Or can I force this somehow?
it have both behaviour, it can be called manually via SDK or automatically trigger whenever new action happen such as document creation, new user regsitation etc...
it's upto you how you would like func to work
I mean if I trigger func 1 from my client and then func 2 gets triggered from inside func 1. Does func 2 gets automatically called locally?
oh yaap
one function can call another function internally*
Okay and this happens automatically? So it does not do the round trip over the external api endpoint?
yap it happen internally, round trip
nope it doesn't
ππ»
Recommended threads
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- HTTP POST to function returning "No Appw...
Hi everyone, Iβm running into an issue with my self-hosted Appwrite instance. Iβve set up my environment variables (APPWRITE_FUNCTION_PROJECT_ID, APPWRITE_FUNC...
- Can't add dart 3.5 runtime
Modified the `.env` to enable dart 3.5 runtime on my self-hosted instance but still can't find the runtime when creating a new function. I manually pulled the i...