olivierwilkinson / prisma-extension-soft-delete

Prisma extension for adding soft delete to Prisma models, even when using nested queries
Apache License 2.0
94 stars 13 forks source link

Soft-delete cascades #1

Open olivierwilkinson opened 10 months ago

olivierwilkinson commented 10 months ago

It would be good to be able to setup soft delete cascades, either through the existing Prisma schema cascades or through a custom API.

Due to the nature of nested operations it probably won't be possible to produce single queries that do this, however some will be able to. In the cases where it is simply not possible to do with a single query a second operation and a transaction will probably be needed.

This was requested in the soft delete Prisma issue

ibraude commented 2 weeks ago

Hey @olivierwilkinson

Please see my comment in the discussion you mentioned.

The logic there might be helpful for implementing cascading soft deletes.