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

Configure Feed

Select the types of activity you want to include in your feed.

README.md

@urql/exchange-refocus#

@urql/exchange-refocus is an exchange for the urql GraphQL client that tracks currently active operations and redispatches them when the window regains focus

Quick Start Guide#

First install @urql/exchange-refocus alongside urql:

yarn add @urql/exchange-refocus
# or
npm install --save @urql/exchange-refocus

Then add it to your Client, preferably before the cacheExchange and in front of any asynchronous exchanges, like the fetchExchange:

import { createClient, cacheExchange, fetchExchange } from 'urql';
import { refocusExchange } from '@urql/exchange-refocus';

const client = createClient({
  url: 'http://localhost:3000/graphql',
  exchanges: [refocusExchange(), cacheExchange, fetchExchange],
});