question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Realtime: how to subscribe to multiple documents

See original GitHub issue

What’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:open
  • Created 4 years ago
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

5reactions
jamesdanielscommented, Jan 8, 2020

@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.

4reactions
bnettercommented, Jan 5, 2020

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found