olivierwilkinson / prisma-extension-soft-delete

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

Null in nested relationships #18

Open imsanchez opened 9 months ago

imsanchez commented 9 months ago

I have a nested many-to-many relationship that uses a soft delete boolean (isDeleted).

The result includes the deleted item as null when it should be redacted:

{
    "teams": [
        {
            "team": null
        }
    ],
}

Desired result:

{
    "teams": [],
}

For now, I decided to use your awesome prisma-extension-nested-operations package and filter the nulls.

olivierwilkinson commented 8 months ago

Heya, sorry for the slow reply, I thought I had responded already!

Please can you post your schema? That will help me reproduce this 👍

Thank you for your kind words as well! 😄