
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
- Error
I'm trying to get sellerId using account.get() in my appwrite function and this is the error message I'm getting: "Failed to send notification to seller 6865bf...
- Is there a timeframe for updating dart r...
Dart 3.5 is already one year old, and the following versions have introduced very important features for the language. Is there a roadmap or timeframe for when...
- Error
I'm trying to get sellerId using account.get() in my appwrite function and this is the error message I'm getting: "Failed to send notification to seller 6865bf...
