{"repo":"sholajegede/convex-cascading-deletes","free":true,"listed":false,"github":"https://github.com/sholajegede/convex-cascading-deletes","clone":"git clone https://github.com/sholajegede/convex-cascading-deletes.git","description":"A Convex component for cascading deletes — delete a record and all its dependents automatically, in the correct order.","language":"TypeScript","stars":16,"topics":["cascade","cleanup","convex","convex-component","database","delete","referential-integrity","relationships"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"@sholajegede/convex-cascading-deletes A Convex component for managing cascading deletes across related documents. Configure relationships via your existing indexes — when you delete a record, all dependent records are cleaned up automatically. Found a bug? Feature request? File it here. Features - Cascading deletes — delete a record and all its dependents in one call - Relationship config — declare relationships once using your existing indexes - Scheduler-based batching — large deletion trees are processed in batches via the Convex scheduler; deletes within a batch are atomic - Circular relationship protection — visited tracking prevents infinite loops - Safe db helper — patch ctx.db to throw on direct .delete() calls, enforcing cascade-only deletions - Deletion logs — every cascade is logged with a per-table count, queryable reactively - Index validation — validate your relationship config against the deployment at startup Installation Add the component to your convex/convex.config.ts : Usage Instantiate the client once, declaring your table relationships: Delete with cascade Deleting a user cascades to their posts, then to each post's comments — all automatically, in the correct order. Enforce cascade-only deletions Query deletion logs Validate indexes at startup API CascadingDeletes class Method Description -------- ------------- deleteWithCascade(ctx, { table, id }) Delete a record and all configured dependents. Returns { [table]: count } . getDeletionLog(ctx, { table, i","default_branch":null,"files":null,"tree":[],"storefront":"/r/sholajegede","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sholajegede/convex-cascading-deletes/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}