Javascript – Firestore onDocumentCreated event handler for nested document – updating the parent document
Let's say you're counting the number of cities in a country, so you register an onDocumentCreated trigger for: /countries/{countryId}/cities/{cityId} In the trigger, you'll want to increase the cityCount in the Country document at /countries/{countryId}. How should this be done? The…