# Deleting node with required inverse edges

**URL:** <https://discuss.dgraph.io/t/deleting-node-with-required-inverse-edges/14279>\
**Category:** GraphQL\
**Tags:** kind:question, data-integrity\
**Created:** [May 22, 2021, 4:13pm UTC](https://discuss.dgraph.io/t/deleting-node-with-required-inverse-edges/14279 "2021-05-22T16:13:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![amaster507](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/amaster507/32/4123_2.png) [@amaster507](https://discuss.dgraph.io/u/amaster507)\
**Post date:** [May 22, 2021, 6:31pm UTC](https://discuss.dgraph.io/t/deleting-node-with-required-inverse-edges/14279/2 "2021-05-22T18:31:23Z")

</div>

Best would be to have control over this behaviour by the developer in the schema similar in nature to MySQL use of “ON DELETE” which has options to either set null, restrict, no action, cascade, and set default.

That would be interesting to see of that logic could be worked in as a schema directive on an edge.

When delete Parent, “set null” is current behaviour on child edge.

- restrict would block delete if there were any children
- no action would leave the inverse edge to the uid that is now empty
- cascade delete children
- set default would set children Parent’s to a staticly declared uid.

---

_[View the full topic](https://discuss.dgraph.io/t/deleting-node-with-required-inverse-edges/14279)._
