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

Hooks - rollback on failure #534

Closed
timleslie opened this issue Dec 3, 2018 · 3 comments
Closed

Hooks - rollback on failure #534

timleslie opened this issue Dec 3, 2018 · 3 comments
Assignees

Comments

@timleslie
Copy link
Contributor

If a mutation fails we need to be able to rollback any operations which happened during the hooks leading up to the failure.

We need to provide a mechanism for this rollback, but it has not yet been decided what that mechanism should be.

The initial hairy session for hook design came up with the idea of providing a addRollbackStep function which could be called from hooks, which would collect all the rollback functions to be executed on failure.

Subsequent review of this in the context of nested mutations and the difficultly of tracking rollbacks introduced the idea that perhaps a simpler design would be that each field type/field/list could have a cleanup (or similar) hook and it would be up to the system designer to keep track of what needed to be called in the case of failure.

@timleslie timleslie self-assigned this Dec 3, 2018
@dcousens dcousens added the core label May 14, 2019
@jesstelford

This comment was marked as off-topic.

@stale
Copy link

stale bot commented Sep 18, 2019

It looks like you haven't had a response in over 3 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contributions. :)

@stale stale bot added the needs-review label Sep 18, 2019
@MadeByMike
Copy link
Contributor

I've updated #211 and am now closing this as a dupe

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

No branches or pull requests

4 participants