Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete cascade #22

Open
wwwy3y3 opened this issue Dec 5, 2018 · 2 comments
Open

Delete cascade #22

wwwy3y3 opened this issue Dec 5, 2018 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@wwwy3y3
Copy link
Contributor

wwwy3y3 commented Dec 5, 2018

Is your feature request related to a problem? Please describe.
Delete mutation should have cascade feature.

Describe the solution you'd like
When deleting a record, the relationship data at other places (relation table, foreign key) should be deleted as well.

@wwwy3y3 wwwy3y3 added the enhancement New feature or request label Dec 5, 2018
@wwwy3y3 wwwy3y3 added this to the Beta milestone Dec 5, 2018
@jonesnc
Copy link
Contributor

jonesnc commented Dec 23, 2018

Maybe a directive could be provided that denotes whether a deletion should also cascade delete related records, leave related records alone, or throw an error when deletion of a record with related data is attempted.

Django offers these options with the on_delete argument of their ForeignKey relationship.

https://docs.djangoproject.com/en/2.1/ref/models/fields/#arguments

@wwwy3y3
Copy link
Contributor Author

wwwy3y3 commented Dec 24, 2018

@jonesnc haven't check out Django api on the relationship before. Looks like we can actually use similar arguments on the cascade deletes part.

Thanks for the helpful information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants