googleapis / googleapis/google-cloud-node

Publicize the recursiveDelete method for deleting subcollections

Open
#7,444 1 comment 2 reactions 1 assignee Claimed by @milaGGL View on GitHub
api: firestore library: nodejs-firestore
Dominant language
TypeScript
Stars
3.2k
Forks
712
Avg merge
2d 3h
Merged PRs (30d)
99

Description

### Please make sure you have searched for information in the following guides.

- [X] Search the issues already opened: https://github.com/GoogleCloudPlatform/google-cloud-node/issues
- [X] Check our libraries HOW-TO: https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md
- [X] Check out our authentication guide: https://github.com/googleapis/google-auth-library-nodejs
- [X] Check out handwritten samples for many of our APIs: https://github.com/GoogleCloudPlatform/nodejs-docs-samples

# I couldn't check these guides because they're 404:
- [ ] Check our Troubleshooting guide: https://googlecloudplatform.github.io/google-cloud-node/#/docs/guides/troubleshooting
- [ ] Check our FAQ: https://googlecloudplatform.github.io/google-cloud-node/#/docs/guides/faq

### Documentation Request

Deleting a subcollection and all of its documents and their subcollections recursively is a [common requirement](https://stackoverflow.com/questions/49286764/delete-a-document-with-all-subcollections-and-nested-subcollections-in-firestore). Yet neither of these Google resources mention [recursiveDelete](https://googleapis.dev/nodejs/firestore/latest/Firestore.html#recursiveDelete):
* https://firebase.google.com/docs/firestore/manage-data/delete-data#collections
* https://firebase.google.com/docs/firestore/solutions/delete-collections

`recursiveDelete` has been available since [v4.11.0](https://github.com/googleapis/nodejs-firestore/releases/tag/v4.11.0), released May 2021. Yet Gemini Thinking doesn't know about it, and reinvents the wheel:

![image](https://github.com/user-attachments/assets/e1020f17-0cd2-453f-8760-fbdca915b97a)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.