olivierwilkinson / prisma-extension-soft-delete

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

Soft-delete cascades #1

Open olivierwilkinson opened 1 year ago

olivierwilkinson commented 1 year 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 3 months ago

Hey @olivierwilkinson

Please see my comment in the discussion you mentioned.

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