The firestore .collectionGroup() method is getting an error when using it with the firebase-admin sdk in a cloud function. Is it possible to make a collection group query to firestore in a cloud function?
Here is the firestore query method I'm trying to use: https://googleapis.dev/nodejs/firestore/latest/Firestore.html#collectionGroup
But it doesn't seem to be available in the firestore admin SDK: https://firebase.google.com/docs/reference/admin/node/admin.firestore
admin.firestore().collectionGroup('photos').where('id', '==', photoId);
I get this error when running the function:
TypeError: admin.firestore(...).collectionGroup is not a function
Wondering if I'm missing something, or if this something that will be added in the future.