You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've spent quite some time over the last week embracing Reactfire, and I really loved the "free" live updating from useFirestoreCollectionData... right up until I hit up against the dreaded:
Uncaught FirebaseError: Invalid Query. 'in' filters support a maximum of 10 elements in the value array.
I'm implementing a parent > child relationship between documents, and while I don't expect the cardinality of this relationship to be unbounded, I do need to be able to support... well... more than 10 or 20 (probably 30 or 40 would be the most I'd ever see).
I'm not an rxjs expert (I've done some functional reactive programming in other languages/frameworks so I'm familiar with the concepts (i.e. I know that at some point, I'm looking for a merge operation across multiple observables) but I'm not experiences with rxjs at all, and new to Reactfire.)
I can obviously chunk my >10 item 'in' query into multiple queries of 10 items or less, but it's not clear to me how I might combine those so as to retain the magical wonder of the "free" live updating, as experienced from the component level.
Is there an established pattern I could use to combine these observables and allow me to watch multiple collection queries without knowing the exact number at build time?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've spent quite some time over the last week embracing Reactfire, and I really loved the "free" live updating from
useFirestoreCollectionData
... right up until I hit up against the dreaded:Uncaught FirebaseError: Invalid Query. 'in' filters support a maximum of 10 elements in the value array.
I'm implementing a parent > child relationship between documents, and while I don't expect the cardinality of this relationship to be unbounded, I do need to be able to support... well... more than 10 or 20 (probably 30 or 40 would be the most I'd ever see).
I'm not an rxjs expert (I've done some functional reactive programming in other languages/frameworks so I'm familiar with the concepts (i.e. I know that at some point, I'm looking for a
merge
operation across multiple observables) but I'm not experiences with rxjs at all, and new to Reactfire.)I can obviously chunk my >10 item 'in' query into multiple queries of 10 items or less, but it's not clear to me how I might combine those so as to retain the magical wonder of the "free" live updating, as experienced from the component level.
Is there an established pattern I could use to combine these observables and allow me to watch multiple collection queries without knowing the exact number at build time?
Beta Was this translation helpful? Give feedback.
All reactions