🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@urql/exchange-refocus

Package Overview
Dependencies
Maintainers
19
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@urql/exchange-refocus

An exchange that dispatches active operations when the window regains focus

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
5.9K
21.46%
Maintainers
19
Weekly downloads
 
Created
Source

@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],
});

Keywords

urql

FAQs

Package last updated on 09 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts