If I delete a user, I may want to delete all the user's posts. If I delete a post, I may want to delete all the post's comments. If this is not handled internally, we will end up phantom nodes or orphan nodes (nodes without connections, wasting space, and can cause database discrepancies).
There is currently impossible to even do this manually, as this would require nested filters. However, this should be done internally like SQL databases.
deep nested updates
Currently I can add nested data, but I cannot update nested data. I can only update their links to other nodes. This is only one minute case. If I have Zip Codes, I don't want to update them from a parent. There are three cases:
You don't want to allow the nested nodes to be updated (current usage)
You want to allow the nested nodes to be updated by their ID / @id
You want to replace the entire nested value, like an array
https://discuss.dgraph.io/t/feature-request-cascade-delete-deep-mutations-by-reference-directive/14658
cascade delete
If I delete a user, I may want to delete all the user's posts. If I delete a post, I may want to delete all the post's comments. If this is not handled internally, we will end up phantom nodes or orphan nodes (nodes without connections, wasting space, and can cause database discrepancies).
There is currently impossible to even do this manually, as this would require nested filters. However, this should be done internally like SQL databases.
deep nested updates
Currently I can add nested data, but I cannot update nested data. I can only update their links to other nodes. This is only one minute case. If I have Zip Codes, I don't want to update them from a parent. There are three cases:
See [notion.so(https://freezing-cabin-946.notion.site/The-State-of-Dgraph-s-GraphQL-API-d7b2c0f4d33341f0b93d09c13fd033a1) for more specific info.
Both of these problems are solvable with a Reference Directive that I suggested here.
To me, this is a huge data integrity problem. It is basically solved by triggers in sql.
J