Is there a method in Cloud Functions to identify all changes in a document triggered by an update in Firestore?
Perhaps something along the lines of:
exports.onUserUpdate = functions.firestore
.document('users/{userID}')
.onWrite((change, context) => {
const beforeData = change.before.data();
const afterData = change.after.data();
const changedKeys = diffDocuments(beforeData, afterData);
})
There's nothing provided by the SDK, if that's what you're asking. You'd have to implement diffDocuments on your own.
If you're asking if someone else has implemented something, "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow" according to the site guidelines. So that sort of question would need to be asked elsewhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With