You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an app that uses a Firestore database, and locally we can use the Firestore Firebase emulators provided by firebase-tools to avoid connecting to a remote/shared database.
It's clear enough on how to connect to the emulators locally for reading/writing data with @google-cloud/firestore, and it's also clear how I can deploy a function built with the Functions Framework that is triggered by a Firestore event. What I'm not clear on is how we can trigger a function built with the Functions Framework when data is written to said Firestore emulator.
Is this something that can be achieved with the Functions Framework, and if so, how does it need to be set up?
The text was updated successfully, but these errors were encountered:
Thanks @HKWinterhalter, I agree this is a bit of a grey area. I asked the question here as there is documentation in this repo on how to trigger functions from the Pub/Sub emulator, and I figure this is a similar use case. In fact, I think I'm asking about pretty much the same solution as was in #101 .
The documentation you've provided doesn't seem related to the Firestore emulator, more for the more general Firebase Functions abstraction. We do actually use those tools for other areas of the app, and local development is just fine with it. But for reasons that aren't important to this ticket, we'd like to avoid using it going forward.
The best I can tell what I'd like isn't explicitly a supported option between firebase-tools and the Functions Framework. I think the correct solution is for firebase-tools to allow sending a CloudEvent out via the Eventarc emulator to the function running from the Functions Framework, but that would add some additional complications.
We have an app that uses a Firestore database, and locally we can use the Firestore Firebase emulators provided by
firebase-tools
to avoid connecting to a remote/shared database.It's clear enough on how to connect to the emulators locally for reading/writing data with
@google-cloud/firestore
, and it's also clear how I can deploy a function built with the Functions Framework that is triggered by a Firestore event. What I'm not clear on is how we can trigger a function built with the Functions Framework when data is written to said Firestore emulator.Is this something that can be achieved with the Functions Framework, and if so, how does it need to be set up?
The text was updated successfully, but these errors were encountered: