Realtime: how to subscribe to multiple documents
See original GitHub issueWhat’s the equivalent of listening to multiple documents in a collection using the realtime-listener
service?
I have a news-feed
component where I’m trying to watch for new activities. Here’s my activities
computed property:
activities: computed('company', function() {
return this.get('store').query('activity', {
query: (ref) => ref.where(`company`, '==', this.get('company.id')).orderBy('createdAt', 'desc');
});
})
That’s fetching correctly current activities, but it’s not updated live. How do I achieve that? I’ve tried the following:
this.get('realtime').subscribe(this, this.get('activities'));
It’s obviously not working as the second parameter has to be a record, not an array.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (13 by maintainers)
Top Results From Across the Web
Firestore Query and Subscribe to Multiple Documents by an ...
If you have independent documents to listen to (not obtained by a single query), then will have to register a listener to each...
Read more >Get realtime updates with Cloud Firestore - Firebase
Get realtime updates with Cloud Firestore ... Events for local changes; Events for metadata changes; Listen to multiple documents in a collection ...
Read more >Subscriptions - Apollo GraphQL Docs
Subscriptions are useful for notifying your client in real time about changes to back-end data, such as the creation of a new object...
Read more >Collaborate on Word documents with real-time co-authoring
If you need to edit the macro code, simply check out the file, edit the code, and check it back in. Learn more...
Read more >Firestore Database - FlutterFlow Docs
Realtime : Firestore database helps you achieve data synchronization to update ... Each user data is stored in a document and such multiple...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bnetter I understand that you’re feeling fustrated but please keep your comments constructive. The space here is meant for building EmberFire, both technology and community. If you’re interested in helping with the former, I welcome any PRs; otherwise please consider if you are helping or harming the latter with your comments.
@zurnet I’m back from the holidays and will be wrapping up the tasks for final release in short order.
I have a meeting next week with the Google team in SF. I will discuss the frustration it has been to work with Firebase, and will try to understand if we can still have hope for Firebase in 2020.
I will let you know!