Current behavior
Delete mutations don't return relation data.
Reproduction
type A {
id: ID! @unique
title: String
b: B
}
type B {
id: ID! @unique
title: String
a: A
}
mutation a {
createA(data: {
title: "A"
b: {
create: {
title: "B"
}
}
}) {
id
}
}
mutation b {
deleteA(where: { id: "ID" } ) {
id
# b is null
b {
id
}
}
}
Expected behavior?
The node b is returned, instead of null, in the previous example.
Workaround
In your GraphQL Server, you can follow this pattern as a workaround for now:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Can this be reopened?
Is there any progress on this?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.
Issue seems to be still unsolved.
Still seems to be problem
Still unsolved.
Experiencing the same. I cannot get relational data during a delete with SET_NULL relations.
It's still there
Most helpful comment
Can this be reopened?