It looks like this feature got released; however, the implementation makes it possible to select only the top-level collections for querying which defeats the purpose of collection group querying. I am excited to use this once I can input the correct sub-collection to collection group query. Any ETA on the fix for this? It seems like a nice short-term fix would be to allow users to type in a custom collection name so we aren’t bound to the ones that retool can find?
Hey @andrewbeckman! You are correct - we’re still working the kinks out so we haven’t updated the thread yet. We’ll update the dropdown to show all subcollections, which, to your point, is literally the whole point of collection group queries - when that’s done I’ll update the thread. Ideally this week.
Another thing - we’re thinking about adding a raw query editor that will allow you to write raw queries via the Firebase JS SDK. That will help us support batched writes, but also give you the ability to write anything that Retool doesn’t quite support yet!
Update for the whole topic - you can now query Firebase collection groups in Retool! You can select “query collection group” from the action type dropdown, choose your collection group name, and set other query params like limits.
You should be able to set subcollectionGroupName as the collection in your Firestore query. As mentioned here once you declare an exception for a collection group in Firestore it functions like a top-level collection would for reads so you'll be querying across every collection with the subcollectionGroupName id in your Firestore db.
It looks like Firestore doesn't natively support limiting collection group queries to a particular path at the moment (though there might be some workarounds).