Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(firestore): add addCollectionGroupSnapshotListener #624

Open
2 of 12 tasks
svrznjak opened this issue May 8, 2024 · 1 comment
Open
2 of 12 tasks

feat(firestore): add addCollectionGroupSnapshotListener #624

svrznjak opened this issue May 8, 2024 · 1 comment

Comments

@svrznjak
Copy link

svrznjak commented May 8, 2024

Plugin(s)

  • Analytics
  • App
  • App Check
  • Authentication
  • Crashlytics
  • Cloud Firestore
  • Cloud Messaging
  • Cloud Storage
  • Performance
  • Remote Config

Current problem

I am not sure but I think there is a very important feature missing. What I am trying to do is addCollectionSnapshotListener on collectionGroup query.
Such a thing can be done with javascript firebase library like this:
const resources = query(collectionGroup(getFirestore(), 'resources'));
onSnapshot(resources, (querySnapshot) => {
querySnapshot.forEach((doc) => {
console.log(doc.data());
});
});

Preferred solution

Since there already are getCollection, addCollectionSnapshotListener and getCollectionGroup functions in API, I would suggest addCollectionGroupSnapshotListener function is added.

I made a quick glance at addCollectionSnapshotListener web code and I think whole function can be copied and only change that is needed is on line 212 where 'collecion' should be changed to 'collectionGroup'.

Alternative options

No response

Additional context

No response

Before submitting

@robingenz robingenz changed the title feat: feat(firestore): add addCollectionGroupSnapshotListener May 8, 2024
@robingenz
Copy link
Member

Thank you for your request. Would you be willing to create a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants