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

Add the "failure?" method to the outcome #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryanfaerman
Copy link

The failure? method helps consumers of the mutations add some clarity.

Sometimes after a mutation, you really just want to recover gracefully on failure and I've found myself with plenty of code resembling the following:

mutation = SomeMutationClass.run(some_params)
unless mutation.success?
  # do something to recover, like attempt something else
end

Having the failure? method makes things just a little clearer since the code can now ask if failure?.

The failure? method helps consumers of the mutations add some clarity.
@anicholson
Copy link

Would be a nice addition, +1

@ryanfaerman
Copy link
Author

It looks like the build failed on this primarily because the rbx ruby target is not running properly.

@eugeneius
Copy link
Collaborator

This does look like it would be useful - sorry it sat unacknowledged for so long 😔

Would you be interested in rebasing this and resolving the conflicts so that I can merge it?

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

Successfully merging this pull request may close these issues.

3 participants