awslabs / aws-mobile-appsync-sdk-js

JavaScript library files for Offline, Sync, Sigv4. includes support for React Native
Apache License 2.0
921 stars 266 forks source link

@@skipRetry variable is ignored when doing query #589

Open robcar opened 4 years ago

robcar commented 4 years ago

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

What is the current behavior? When using AWSAppSyncClient.query there seems to be support in the retryLink for bypassing the retry functionality by passing a variable @@skipRetry: true but this is ignored and retries are performed anyway.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

    const client = new AWSAppSyncClient(yourConfigHere)
    const c = await client.hydrated()
    const variables = {
        ['@@skipRetry']: true,
    }
    const response = await c.query({
        query: yourQueryHere,
        variables,
    })

What is the expected behavior? That no retries for this query should occur

Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions? Google Chrome on MacOS