
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
- Function running in cloud but not locall...
Hi everyone, I have an appwrite function which is on python3.12 runtime. I have a library (hnswlib) which builds wheels during installation. This works on appwr...
- Permissions for bulk operation
Hi team, I have a question: βIn the databases.createDocuments bulk API, can I set document-level permissions? If yes, how exactly should I include the permissio...
- Limit File Upload count?
Is there a way to limit the number of files a user can upload? I know there's a limit of file size but in my case I'd like to limit the user to only upload x am...
