Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

Integrating @urql/exchange-retry’s retryExchange#

Open in StackBlitz Open in CodeSandbox

Integrating urql is as simple as:

  1. Install packages
yarn add urql graphql
# or
npm install --save urql graphql
  1. Add retry exchange
yarn add @urql/exchange-retry
# or
npm install --save @urql/exchange-retry
  1. Setting up the Client and adding the retryExchange here

  2. Execute the Query here

With Retry#

This example shows urql in use with @urql/exchange-retry's retryExchange to implement retrying failed operations. This largely follows the "Retrying Operations" docs page and uses the trygql.formidable.dev/graphql/intermittent-colors schema, which emits a special NO_SOUP error randomly.

To run this example install dependencies and run the start script:

yarn install
yarn run start
# or
npm install
npm run start

This example contains: