PackageTrack

npm · #4398

@urql/exchange-retry

2.0.0urql-graphql/urql

An exchange for operation retry support in urql

Release timeline

64 releases since 2020
2020202120222023202420252026

Releases

  1. 2.0.09 Aug 2025
    Release notes

    Major Changes

    • Implement new authExchange API, which removes the need for an authState (i.e. an internal authentication state) and removes getAuth, replacing it with a separate refreshAuth flow. The new API requires you to now pass an initializer function. This function receives a utils object with utils.mutate and utils.appendHeaders utility methods. It must return the configuration object, wrapped in a promise, and this configuration is similar to what we had before, if you're migrating to this. Its refreshAuth method is now only called after authentication errors occur and not on initialization. Instead, it's now recommended that you write your initialization logic in-line.
      authExchange(async utils => {
        let token = localStorage.getItem('token');
        let refreshToken = localStorage.getItem('refreshToken');
        return {
          addAuthToOperation(operation) {
            return utils.appendHeaders(operation, {
              Authorization: `Bearer ${token}`,
            });
          },
          didAuthError(error) {
            return error.graphQLErrors.some(
              e => e.extensions?.code === 'FORBIDDEN'
            );
          },
          async refreshAuth() {
            const result = await utils.mutate(REFRESH, { token });
            if (result.data?.refreshLogin) {
              token = result.data.refreshLogin.token;
              refreshToken = result.data.refreshLogin.refreshToken;
              localStorage.setItem('token', token);
              localStorage.setItem('refreshToken', refreshToken);
            }
          },
        };
      });
      
      Submitted by @kitten (See #3012)

    Patch Changes

    • ⚠️ Fix willAuthError not being called for operations that are waiting on the authentication state to update. This can actually lead to a common issue where operations that came in during the authentication initialization (on startup) will never have willAuthError called on them. This can cause an easy mistake where the initial authentication state is never checked to be valid Submitted by @kitten (See #3017)
    • Updated dependencies (See #3007, #2962, #3007, #3015, and #3022)
    Open source →
    Additional notes

    Major Changes

    • Goodbye IE11! 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will not be ES5-compatible anymore, by @kitten (See #2504)
    • Upgrade to Wonka v6 (wonka@^6.0.0), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by @kitten (See #2504)
    Open source →
    Additional notes

    Major Changes

    • Goodbye IE11! 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will not be ES5-compatible anymore, by @kitten (See #2504)
    • Upgrade to Wonka v6 (wonka@^6.0.0), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by @kitten (See #2504)

    Minor Changes

    • Remove the babel-plugin-modular-graphql helper, this because the graphql package hasn't converted to ESM yet which gives issues in node environments, by @JoviDeCroock (See #2551)

    Patch Changes

    Open source →
    Additional notes

    Major Changes

    • Goodbye IE11! 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will not be ES5-compatible anymore, by @kitten (See #2504)
    • Upgrade to Wonka v6 (wonka@^6.0.0), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by @kitten (See #2504)

    Minor Changes

    • Remove the babel-plugin-modular-graphql helper, this because the graphql package hasn't converted to ESM yet which gives issues in node environments, by @JoviDeCroock (See #2551)

    Patch Changes

    Open source →
    Additional notes

    Major Changes

    • Reimplement Svelte with functional-only API. We've gotten plenty of feedback and issues from the Svelte community about our prior Svelte bindings. These bindings favoured a Store singleton to read and write to, and a separate signal to start an operation. Svelte usually however calls for a lot more flexibility, so we're returning the API to a functional-only API again that serves to only create stores, which is more similar to the original implementation, by @jonathanstanley (See #2370)

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    Open source →
  2. 2.0.0-canary-d3b019d51905c1c8b22be9ea1d9fe9ca4335a46c9 Aug 2025pre-release

    Nothing published for this version

  3. 2.0.0-canary-b981b388ee9ed0066399a632aad6b84559f014a69 Aug 2025pre-release

    Nothing published for this version

  4. 2.0.0-canary-b2d8b993af4abb0ffc5c5284b90aca56c527f04529 Jun 2025pre-release

    Nothing published for this version

  5. 1.3.227 Jun 2025
    Release notes2 sources agree

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • ⚠️ Fix deep options reactivity for subscriptions Submitted by @JoviDeCroock (See #3616)
    Open source →
  6. 1.3.13 Mar 2025
    Release notes2 sources agree

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    Open source →
  7. 1.3.1-canary-573944cea80f766668d3b9d8aa1afd2c50d744a43 Mar 2025pre-release

    Nothing published for this version

  8. 1.3.010 May 2024
    Release notes

    Minor Changes

    • Use shallowRef to avoid creating deeply reactive objects for heavy objects Submitted by @negezor (See #3611)
    • Remove wrapping request args in reactive to fix memory leak Submitted by @negezor (See #3612)
    Open source →
    Additional notes2 sources agree

    Minor Changes

    • Mark @urql/core as a peer dependency as well as a regular dependency Submitted by @kitten (See #3579)
    Open source →
  9. 1.3.0-canary-9bf3289b7 May 2024pre-release

    Nothing published for this version

  10. 1.3.0-canary-9272cefa3 May 2024pre-release

    Nothing published for this version

  11. 1.3.0-canary-0204e0443 May 2024pre-release

    Nothing published for this version

  12. 1.3.0-canary-019b1bb04 May 2024pre-release

    Nothing published for this version

  13. 1.2.117 Jan 2024
    Release notes2 sources agree

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • Omit minified files and sourcemaps' sourcesContent in published packages Submitted by @kitten (See #3755)
    Open source →
    Additional notes

    Patch Changes


    Fixed the delay amount not increasing as retry count increases Submitted by @DoisKoh (See #3478)

    Open source →
    Additional notes

    Patch Changes

    • ⚠️ Fix regression causing pause argument on useQuery and useSubscription to not be reactive Submitted by @arkandias (See #3595)
    Open source →
    Additional notes

    Patch Changes


    Fixed the delay amount not increasing as retry count increases Submitted by @DoisKoh (See #3478)

    Open source →
  14. 1.2.1-canary-1fabe35817 Jan 2024pre-release

    Nothing published for this version

  15. 1.2.031 May 2023
    Release notes2 sources agree

    Minor Changes

    • Mark @urql/core as a peer dependency as well as a regular dependency Submitted by @kitten (See #3579)
    Open source →
    Additional notes

    Minor Changes

    Open source →
    Additional notes

    Minor Changes

    • Mark @urql/core as a peer dependency as well as a regular dependency Submitted by @kitten (See #3579)

    Patch Changes

    • ⚠️ Fix subscription handlers to not receive null values Submitted by @kitten (See #3581)
    • Add missing support for getter functions as input arguments values to useQuery, useSubscription, and useMutation Submitted by @kitten (See #3582)
    Open source →
    Additional notes2 sources agree

    Minor Changes

    • Reset retryExchange’s previous attempts and delay if an operation succeeds. This prevents the exchange from keeping its old retry count and delay if the operation delivered a result in the meantime. This is important for it to help recover from failing subscriptions Submitted by @kitten (See #3229)
    Open source →
  16. 1.1.125 Apr 2023
    Release notes

    Patch Changes

    • Omit minified files and sourcemaps' sourcesContent in published packages Submitted by @kitten (See #3755)
    Open source →
    Additional notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • ⚠️ Fix CVE-2024-24556, addressing an XSS vulnerability, where @urql/next failed to escape HTML characters in JSON payloads injected into RSC hydration bodies. When an attacker is able to manipulate strings in the JSON response in RSC payloads, this could cause HTML to be evaluated via a typical XSS vulnerability (See GHSA-qhjf-hm5j-335w for details.) Submitted by @JoviDeCroock (See 4b7011b7)
    Open source →
    Additional notes3 sources agree

    Patch Changes

    • Publish with npm provenance Submitted by @kitten (See #3180)
    Open source →
    Additional notes

    Patch Changes

    Open source →
  17. 1.1.031 Mar 2023
    Release notes2 sources agree

    Minor Changes

    • Mark @urql/core as a peer dependency as well as a regular dependency Submitted by @kitten (See #3579)
    Open source →
    Additional notes

    Minor Changes

    • Change the request-policy exchange not to rely on OperationMeta set by the cache exchanges Submitted by @JoviDeCroock (See #3521)
    Open source →
    Additional notes

    Minor Changes

    • Bump peer-dependency of @react-native-community/netinfo to allow v11 Submitted by @albinhubsch (See #3485)
    Open source →
    Additional notes

    Minor Changes

    • Support a nonce prop on DataHydrationContextProvider that passes it onto its script tags' attributes Submitted by @Enalmada (See #3398)

    Patch Changes

    • ⚠️ Fix invalid CJS by importing react with import-all semantics Submitted by @JoviDeCroock (See #3405)
    Open source →
    Additional notes

    Minor Changes

    • Allow mutations to update their results in bindings when hasNext: true is set, which indicates deferred or streamed results Submitted by @kitten (See #3103)

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Minor Changes

    • Update exchanges to drop redundant share calls, since @urql/core’s composeExchanges utility now automatically does so for us Submitted by @kitten (See #3082)

    Patch Changes

    Open source →
    Additional notes

    Minor Changes

    • Update exchanges to drop redundant share calls, since @urql/core’s composeExchanges utility now automatically does so for us Submitted by @kitten (See #3082)

    Patch Changes

    Open source →
    Additional notes

    Minor Changes

    • Introduce maxDepth and skipType into the populateExchange, these options allow you to specify the maximum depth a mutation should be populated as well as which types should not be counted towards this depth Submitted by @JoviDeCroock (See #3023)

    Patch Changes

    Open source →
  18. 1.0.019 Aug 2022
    Release notes

    Major Changes

    • Create @urql/next which is a package meant to support Next 13 and the React 18 features contained within. For server components we have @urql/next/rsc and for client components just @urql/next Submitted by @JoviDeCroock (See #3214)
    Open source →
    Additional notes

    Major Changes

    • Goodbye IE11! 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will not be ES5-compatible anymore, by @kitten (See #2504)
    • Implement stricter variables types, which require variables to always be passed and match TypeScript types when the generic is set or inferred. This is a breaking change for TypeScript users potentially, unless all types are adhered to, by @kitten (See #2607)
    • Upgrade to Wonka v6 (wonka@^6.0.0), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by @kitten (See #2504)

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Major Changes

    • Goodbye IE11! 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will not be ES5-compatible anymore, by @kitten (See #2504)
    Open source →
    Additional notes2 sources agree

    Major Changes

    • Goodbye IE11! 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will not be ES5-compatible anymore, by @kitten (See #2504)
    • Upgrade to Wonka v6 (wonka@^6.0.0), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by @kitten (See #2504)

    Patch Changes

    Open source →
    Additional notes3 sources agree

    Major Changes

    • Goodbye IE11! 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will not be ES5-compatible anymore, by @kitten (See #2504)
    • Upgrade to Wonka v6 (wonka@^6.0.0), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by @kitten (See #2504)

    Patch Changes

    Open source →
    Additional notes2 sources agree

    Major Changes

    • Goodbye IE11! 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will not be ES5-compatible anymore, by @kitten (See #2504)
    • Upgrade to Wonka v6 (wonka@^6.0.0), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by @kitten (See #2504)

    Minor Changes

    • Remove the babel-plugin-modular-graphql helper, this because the graphql package hasn't converted to ESM yet which gives issues in node environments, by @JoviDeCroock (See #2551)

    Patch Changes

    Open source →
  19. 0.3.37 Apr 2022
    Release notes

    Patch Changes

    • Avoid making the imports of @urql/introspection more specific than they need to be, this because we aren't optimizing for bundle size and in pure node usage this can confuse Node as import x from 'graphql' won't share the same module scope as import x from 'graphql/x/y.mjs', by @JoviDeCroock (See #2529)
    Open source →
    Additional notes2 sources agree

    Patch Changes

    Open source →
  20. 0.3.29 Dec 2021
    Release notes

    Patch Changes

    • ⚠️ Fix import of executeSync rather than execute causing an incompatibility when several .mjs imports and a main import { executeSync } from 'graphql' are causing two different modules to be instantiated, by @kitten (See #2251)
    Open source →
    Additional notes

    Patch Changes

    • Extend peer dependency range of graphql to include ^16.0.0. As always when upgrading across many packages of urql, especially including @urql/core we recommend you to deduplicate dependencies after upgrading, using npm dedupe or npx yarn-deduplicate, by @kitten (See #2133)
    • Updated dependencies (See #2133)
    Open source →
  21. 0.3.14 Dec 2021
    Release notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • ⚠️ Fix operations sometimes not being executed after a retry is supposed to be triggered, due to a setTimeout reordering issue when the timer isn't as predictable as it should be, by @kitten (See #2124)
    Open source →
  22. 0.3.024 Aug 2021
    Release notes

    Minor Changes

    • Mark @urql/core as a peer dependency as well as a regular dependency Submitted by @kitten (See #3579)
    Open source →
    Additional notes

    Minor Changes

    • Add a new retryWith option which allows operations to be updated when a request is being retried, by @kitten (See #1881)

    Patch Changes

    Open source →
  23. 0.2.17 May 2021
    Release notes

    Patch Changes

    • Publish with npm provenance Submitted by @kitten (See #3180)
    Open source →
    Additional notes

    Patch Changes

    Open source →
  24. 0.2.06 Nov 2020
    Release notes

    Minor Changes

    • Fix SSR runtime failures caused by importing SolidStart's action API at module load time by reading action from Provider context instead Submitted by @JoviDeCroock (See #3850)

    Patch Changes

    • ⚠️ Fix createSubscription to use @urql/solid-start context instead of re-exporting the Solid-only implementation from @urql/solid Submitted by @JoviDeCroock (See #3850)
    Open source →
    Additional notes

    Minor Changes

    • Update exchanges to drop redundant share calls, since @urql/core’s composeExchanges utility now automatically does so for us Submitted by @kitten (See #3082)

    Patch Changes

    Open source →
    Additional notes

    @urql/[email protected]

    Compare

    Choose a tag to compare

    Open source →
    Additional notes

    Minor Changes

    • Add a second Operation input argument to the retryIf predicate, so that retrying can be actively avoided for specific types of operations, e.g. mutations or subscriptions, in certain user-defined cases, by @kitten (See #1117)

    Patch Changes

    Open source →
  25. 0.1.1029 Oct 2020
    Release notes

    Patch Changes

    • ⚠️ Fix the production build overwriting the development build. Specifically in the previous release we mistakenly replaced all development bundles with production bundles. This doesn't have any direct influence on how these packages work, but prevented development warnings from being logged or full errors from being thrown, by @kitten (See #1097)
    • Updated dependencies (See #1097)
    Open source →
  26. 0.1.929 Oct 2020
    Release notes

    Patch Changes

    • Deprecate the Operation.operationName property in favor of Operation.kind. This name was previously confusing as operationName was effectively referring to two different things. You can safely upgrade to this new version, however to mute all deprecation warnings you will have to upgrade all urql packages you use. If you have custom exchanges that spread operations, please use the new makeOperation helper function instead, by @bkonkle (See #1045)
    • Updated dependencies (See #1094 and #1045)
    Open source →
  27. 0.1.810 Jun 2020
    Release notes

    Patch Changes

    • Upgrade to a minimum version of wonka@^4.0.14 to work around issues with React Native's minification builds, which use uglify-es and could lead to broken bundles, by @kitten (See #842)
    • Updated dependencies (See #838 and #842)
    Open source →
  28. 0.1.729 Apr 2020
    Release notes

    Patch Changes

    • Add source debug name to all dispatchDebug calls during build time to identify events by which exchange dispatched them, by @JoviDeCroock (See #780)
    • Updated dependencies (See #780)
    Open source →
  29. 0.1.629 Apr 2020
    Release notes

    Patch Changes

    • Add a "./package.json" entry to the package.json's "exports" field for Node 14. This seems to be required by packages like rollup-plugin-svelte to function properly, by @JoviDeCroock (See #771)
    • Updated dependencies (See #771)
    Open source →
  30. 0.1.520 Apr 2020
    Release notes

    Patch Changes

    Open source →
  31. 0.1.49 Apr 2020
    Release notes

    Patch Changes

    Open source →
  32. 0.1.319 Mar 2020
    Release notes

    Patch Changes

    • ⚠️ Fix node resolution when using Webpack, which experiences a bug where it only resolves package.json:main instead of module when an .mjs file imports a package, by @JoviDeCroock (See #642)
    • Updated dependencies (See #642)
    Open source →
  33. 0.1.218 Mar 2020
    Release notes

    Patch Changes

    • Update graphql-toe and add more detail to README Submitted by @benjie (See #3765)
    Open source →
    Additional notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • ⚠️ Fix Node.js Module support for v13 (experimental-modules) and v14. If your bundler doesn't support .mjs files and fails to resolve the new version, please double check your configuration for Webpack, or similar tools, by @JoviDeCroock (See #637)
    • Updated dependencies (See #637)
    Open source →
  34. 0.1.112 Mar 2020
    Release notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • Add type for hasNext to the query and mutation results Submitted by @JoviDeCroock (See #3703)
    Open source →
    Additional notes

    Patch Changes

    Open source →
  35. 0.1.012 Mar 2020
    Release notes

    Minor Changes

    • Initial release of @urql/solid-start - URQL integration built with SolidStart's native primitives. Get started with:
      • createQuery - GraphQL queries using SolidStart's query() and createAsync()
      • createMutation - GraphQL mutations using SolidStart's action() and useAction()
      • createSubscription - Real-time GraphQL subscriptions
      • Provider and useClient - Context-based client access
      • Reactive variables - All parameters accept signals/accessors for automatic re-execution
      • Full SSR support - Works seamlessly with SolidStart's server-side rendering
      • TypeScript support - Complete type safety with GraphQL types
      • Uses @solid-primitives/utils - Leverages standard Solid ecosystem utilities Submitted by @davedbase (See #3837)

    Patch Changes

    Open source →
    Additional notes

    Minor Changes

    Open source →
    Additional notes

    Minor Changes

    Patch Changes

    • Export Provider from the entry Submitted by @XiNiHa (See #3670)
    • Correctly track query data reads with suspense Submitted by @XiNiHa (See #3672)
    • feat(solid): reconcile data updates Submitted by @XiNiHa (See #3674)
    Open source →
    Additional notes

    Changelog

    v0.1.0

    Initial Release

    Open source →
    Additional notes

    Initial Release

    Open source →
  36. 0.0.0-canary-2023053111225631 May 2023pre-release

    Nothing published for this version

  37. 0.0.0-canary-2023053110110931 May 2023pre-release

    Nothing published for this version

  38. 0.0.0-canary-2023053109571631 May 2023pre-release

    Nothing published for this version

  39. 0.0.0-canary-2023053109223731 May 2023pre-release

    Nothing published for this version

  40. 0.0.0-canary-2023042513162625 Apr 2023pre-release

    Nothing published for this version

  41. 0.0.0-canary-2023033114404031 Mar 2023pre-release

    Nothing published for this version

  42. 0.0.0-canary-2023033114263731 Mar 2023pre-release

    Nothing published for this version

  43. 0.0.0-canary-2023033114223831 Mar 2023pre-release

    Nothing published for this version

  44. 0.0.0-canary-2023033114223531 Mar 2023pre-release

    Nothing published for this version

  45. 0.0.0-canary-2023032816574528 Mar 2023pre-release

    Nothing published for this version

  46. 0.0.0-canary-2023032717261327 Mar 2023pre-release

    Nothing published for this version

  47. 0.0.0-canary-2023032717185227 Mar 2023pre-release

    Nothing published for this version

  48. 0.0.0-canary-2023032716081627 Mar 2023pre-release

    Nothing published for this version

  49. 0.0.0-canary-2023032715560927 Mar 2023pre-release

    Nothing published for this version

  50. 0.0.0-canary-2023032713513527 Mar 2023pre-release

    Nothing published for this version

  51. 0.0.0-canary-2023032612464526 Mar 2023pre-release

    Nothing published for this version

  52. 0.0.0-canary-2023032413162724 Mar 2023pre-release

    Nothing published for this version

  53. 0.0.0-canary-2023032410522524 Mar 2023pre-release

    Nothing published for this version

  54. 0.0.0-canary-2023032410514924 Mar 2023pre-release

    Nothing published for this version

  55. 0.0.0-canary-2023032011483020 Mar 2023pre-release

    Nothing published for this version

  56. 0.0.0-canary-2023032007173120 Mar 2023pre-release

    Nothing published for this version

  57. 0.0.0-canary-2023032007134920 Mar 2023pre-release

    Nothing published for this version

  58. 0.0.0-canary-2023032007134620 Mar 2023pre-release

    Nothing published for this version

  59. 0.0.0-canary-2023032007133920 Mar 2023pre-release

    Nothing published for this version

  60. 0.0.0-canary-2023031823124018 Mar 2023pre-release

    Nothing published for this version