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

(retry) - Add operation argument to retryIf predicate #1117

Merged
merged 2 commits into from Nov 4, 2020

Conversation

kitten
Copy link
Member

@kitten kitten commented Nov 4, 2020

Resolve #1116

Summary

Suppose there's a error.graphqlErrors error and that triggers a retry. This type of error won't have broken the operation pipe for subscriptions, so retrying will start an identical operation in that case for subscriptions, depending on the transport protocol and method that's used.

We could also consider adding a small dedup predicate to subscriptionExchange but for now we should allow the retryExchange to be configured to ignore certain cases per operation kind.

Set of changes

  • Add operation: Operation argument to retryIf predicate

@changeset-bot
Copy link

changeset-bot bot commented Nov 4, 2020

🦋 Changeset detected

Latest commit: c551a57

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@urql/exchange-retry Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@wgolledge wgolledge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🥳

@kitten kitten merged commit 2997679 into main Nov 4, 2020
@kitten kitten deleted the feat/retry-if-operation-input branch November 4, 2020 15:35
This was referenced Nov 6, 2020
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.

(retry) - Allow retryIf to avoid retrying subscriptions on non-network error
2 participants