Make query stream, similar to onSnapshot, allowing to download the stream and attach listener to changes. #1262
Labels
api: firestore
Issues related to the googleapis/nodejs-firestore API.
triage me
I really want to be triaged.
Query stream as far as I understand only downloads the query request.
https://cloud.google.com/nodejs/docs/reference/firestore/1.3.x/Query#stream
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is your feature request related to a problem? Please describe.
The problem is if a collection is too big, I am getting timeout error like this because the onSnapshot is downloading a lot of data and not streaming it.
Issue discussed here, acupofjose/elasticstore#35
Reference to a similar problem: #1040
Describe the solution you'd like
Firestore has a stream capability, https://cloud.google.com/nodejs/docs/reference/firestore/1.3.x/Query#stream but it only downloads the query, not constantly listens for changes. Is it possible to use the stream, in a similar way to onSnapshot does?
Describe alternatives you've considered
Use query stream as an initial source of data, then onSnapshot changes for only changed documents, using child_added and time > now query. proposed https://stackoverflow.com/questions/33885059/how-to-only-get-new-data-without-existing-data-from-a-firebase
The text was updated successfully, but these errors were encountered: