Skip to content

Instantly share code, notes, and snippets.

View navidshad's full-sized avatar
🏠
Working at home

Navid navidshad

🏠
Working at home
View GitHub Profile
@navidshad
navidshad / firestore_cursor.js
Last active October 17, 2023 08:41
Read all data from Firestore by a cursor and resolve the Bandwidth Exhausted error
/*
How can we read all data from a firestore collection?
Problem:
When you are reading a hug collection doc by doc from Firebase these problems happens for you:
1. firestore cursor is not proper as a powerful cursor as to be able make this task done.
2. after few thousands request you will get Bandwidth Exhausted error.
Solution