My function is executed after the document update , how i can get the oldValue and Current Document in the cloud function ?
For now you'll get only the current-updated values of the document.
This is a requested feature, you can check about it here (and upvote): https://github.com/appwrite/appwrite/issues/3294
The quick workaround would be what Steven's suggesting here https://github.com/appwrite/appwrite/discussions/5615#discussioncomment-6071506
and that value is in the req.variables.APPWRITE_FUNCTION_EVENT_DATA ?
as a whole document ?
I have to do some extra work for this to work . Okay thanks
Yes.
Recommended threads
- I can't UNPAUSE my project with the free...
I received an email notifying me that my project had been paused due to inactivity, and the email included a link to "Restore project." However, that button red...
- Error trying to deploy functions from CL...
✗ Error • on-auth-create (6a00b2ab000c9ce2949b) • Server Error ✗ Error: No functions were pushed. Prject ID: 69ffe0270033a4ac420a
- Intermittent Deploy and Execution Errors...
Project: project-fra-658e2f5f4ba30df91177 Function ID: 69bde006001c56757f49 **Several execution errors with:** Timed out waiting for runtime.\nError Code: 400...