Try this
upsert {
query {
v as var(func: has(Post.comments))
}
mutation {
set {
uid(v) <dgraph.type> "Post" .
}
}
}
After that you can try to delete the target node.
Try this
upsert {
query {
v as var(func: has(Post.comments))
}
mutation {
set {
uid(v) <dgraph.type> "Post" .
}
}
}
After that you can try to delete the target node.