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.

feat(query) enable support for DocumentSnapshot with start/endAt

See original GitHub issue

What is the feature? enable passing a DocumentSnapshot to a query https://firebase.google.com/docs/reference/js/firebase.firestore.Query#start-at

Do you have thoughts/examples on how the feature would be used (i.e. API)?

I’m trying to implement a table that allows me to page through the documents returned by a query. Because of duplication of properties of the documents I cannot reliable use these properties to paginate. I need to use startAt/endAt with an actual DocumentSnapshot passed to ensure I am not missing any documents. This behaviour is talked about in the firestore docs

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
illuministcommented, Dec 19, 2019

Thank you @goleary

I have found my mistake. I set document data as a key for QuerySnapshot instead of intended DocumentSnapshot. I even forgot to add the responding unit test to test if snapshot is right for the inner data.

PR https://github.com/prescottprue/redux-firestore/pull/258

1reaction
prescottpruecommented, Dec 16, 2019

@goleary Thanks for reaching out - I reached out to @illumnist over gitter for more detail.

How did you end up using it? Would you mind sharing the app logic?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get realtime updates with Cloud Firestore - Firebase
Then, each time the contents change, another call updates the document snapshot. Note: Realtime listeners are not supported in the PHP client library....
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