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
- Bug: Cloud Function On Schedule Didn't R...
Heya I have a cloud function with this cron `0 17 * * *` to run at 9AM PT every day. I have not touched this since I set it up, and it has been working fine s...
- functions
Code for function not being created in Github. Permissions are set correctly, repository is created, however no code is in the created repository. Just trying...
- Urgent help required - Could not resolve...
I upgraded my production environment to 1.8.0 but experienced issues with appwrite running out of worker threads. I downgraded back to 1.6.1 and restored the da...