
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@urql/storage-rn
Advanced tools
@urql/storage-rn is a Graphcache offline storage for React Native.
It is compatible for both plain React Native and Expo apps (including managed workflow), but it has a two peer dependencies - Async Storage and NetInfo - which must be installed separately. AsyncStorage will be used to persist the data, and NetInfo will be used to determine when the app is online and offline.
Install NetInfo (RN | Expo) and AsyncStorage (RN | Expo).
Install @urql/storage-rn alongside urql and @urql/exchange-graphcache:
yarn add @urql/storage-rn
# or
npm install --save @urql/storage-rn
Then add it to the offline exchange:
import { createClient, fetchExchange } from 'urql';
import { offlineExchange } from '@urql/exchange-graphcache';
import { makeAsyncStorage } from '@urql/storage-rn';
const storage = makeAsyncStorage({
dataKey: 'graphcache-data', // The AsyncStorage key used for the data (defaults to graphcache-data)
metadataKey: 'graphcache-metadata', // The AsyncStorage key used for the metadata (defaults to graphcache-metadata)
maxAge: 7, // How long to persist the data in storage (defaults to 7 days)
});
const cache = offlineExchange({
schema,
storage,
updates: {
/* ... */
},
optimistic: {
/* ... */
},
});
const client = createClient({
url: 'http://localhost:3000/graphql',
exchanges: [cache, fetchExchange],
});
FAQs
Graphcache offline storage for React Native
The npm package @urql/storage-rn receives a total of 4,233 weekly downloads. As such, @urql/storage-rn popularity was classified as popular.
We found that @urql/storage-rn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.