-
Notifications
You must be signed in to change notification settings - Fork 867
Cannot delete nodes with relations #1795
Comments
Running into the same issue with Prisma. In Graphcool framework this was working so I guess it should be in Prisma too. |
This is because the relation in Answer has a required question, therefore, if you delete the question, it will result in it having null for an answer. There should be a way to be able to tell prisms what to do on deleting nodes with relations, like delete the relations as well or what not. |
I can confirm that this is unexpected behaviour. @johhansantana the key point here is that there are no |
Exactly, @marktani. Yes i follow #1262 and cascading deletes or orphaned nodes are a great feature, but i think this here is a very urgent bug, as one cannot delete any nodes in the database. (that have parent-child relationship - that is a lot of things...). I mean the D from CRUD is basically broken. I wonder why there's no unit test covering this. |
Thanks for bringing this up @nickluger. As part of our work to implement cascading deletes we already reworked how the top-level delete verifies relations and added test coverage for this. We will merge the current state of the Cascading Deletes PR https://github.com/graphcool/prisma/pull/1764 since it fixes this bug. The implementation of Cascading Deletes will then continue in a separate PR. |
Any idea of when this fix will be released? |
This has now been release in |
I have two types
If i run:
i receive:
if i run:
i get:
Why's that? There are no answers.
The text was updated successfully, but these errors were encountered: