# Feature Request: Cascade Delete & Deep Mutations By Reference Directive

**URL:** <https://discuss.dgraph.io/t/feature-request-cascade-delete-deep-mutations-by-reference-directive/14658>\
**Category:** GraphQL\
**Tags:** kind:enhancement, kind:feature\
**Created:** [June 20, 2021, 4:36am UTC](https://discuss.dgraph.io/t/feature-request-cascade-delete-deep-mutations-by-reference-directive/14658 "2021-06-20T04:36:10Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jdgamble555](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/jdgamble555/32/7503_2.png) [@jdgamble555](https://discuss.dgraph.io/u/jdgamble555)\
**Post date:** [September 21, 2021, 2:38am UTC](https://discuss.dgraph.io/t/feature-request-cascade-delete-deep-mutations-by-reference-directive/14658/4 "2021-09-21T02:38:34Z")

</div>

This is a foreign key problem. I just wanted to add a list of competitor’s solutions to this GraphQL problem. Obviously sql also handles this internally @reference.

Pay particular attention to this [Prisma Solution](https://www.prisma.io/docs/concepts/components/prisma-schema/relations/referential-actions#cascade) in the schema.

Look familiar to my idea?

### Delete

- Neo4j - [Nested Delete](https://neo4j.com/docs/graphql-manual/current/mutations/delete/#_nested_delete)
- Prisma - [Cascade](https://www.prisma.io/docs/concepts/components/prisma-schema/relations/referential-actions#cascade)
- Hasura - [Delete all objects](https://www.prisma.io/docs/concepts/components/prisma-schema/relations/referential-actions#cascade)

### Update

- Neo4j - [Nested Create](https://neo4j.com/docs/graphql-manual/current/mutations/update/#_nested_create)
- Hasura - [Update Object based on nested fields](https://neo4j.com/docs/graphql-manual/current/mutations/update/#_nested_create)
- Prisma - [Nested Writes](https://neo4j.com/docs/graphql-manual/current/mutations/update/#_nested_create)

J

---

_[View the full topic](https://discuss.dgraph.io/t/feature-request-cascade-delete-deep-mutations-by-reference-directive/14658)._
