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

@@skipRetry is ignored in retry-link #354

Closed
WIStudent opened this issue Feb 5, 2019 · 0 comments
Closed

@@skipRetry is ignored in retry-link #354

WIStudent opened this issue Feb 5, 2019 · 0 comments
Labels
bug Used as a label for bugs found in AppSync SDK

Comments

@WIStudent
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
While looking for a way to configure the retry behaviour I stumbled upon the @@skipRetry variable in retry-link. I then noticed that it will always be ignored because the variable is removed before it can reach the retry-link.

    const link = ApolloLink.from([
        retryLink,
        origLink,
    ]);

    return new ApolloLink((operation, forward) => {
        const { [SKIP_RETRY_KEY]: skipRetry = false, ...otherVars } = operation.variables;

        if (skipRetry) {
            operation.variables = otherVars;
        }

        return link.request(operation, forward);
    });

https://github.com/awslabs/aws-mobile-appsync-sdk-js/blob/master/packages/aws-appsync/src/link/retry-link.ts

If the @@skipRetry variable is the intended way to disable retries, then this part needs to be changed in a way that removes the variable for origLink, but not for retryLink.

@haverchuck haverchuck added the bug Used as a label for bugs found in AppSync SDK label Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used as a label for bugs found in AppSync SDK
Projects
None yet
Development

No branches or pull requests

2 participants