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

How can I deliberately fail a mutation for testing purposes? #2673

Open
john1625b opened this issue Nov 30, 2022 · 0 comments
Open

How can I deliberately fail a mutation for testing purposes? #2673

john1625b opened this issue Nov 30, 2022 · 0 comments

Comments

@john1625b
Copy link

john1625b commented Nov 30, 2022

For example in the following code, how do I make the code go into the .catch block

    changeSubjectLine({
      variables: {
        campaignId,
      },
    })
      .then(() => {
        toast(successToast('Subject line dynamic saved.'));
      })
      .catch((e) => {
        toast(errorToastConfig(e));
      // I want the code to go into here
      });

Is there a flag I can put in there to make it do that

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

1 participant