Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@urql/exchange-graphcache
Advanced tools
An exchange for normalized caching support in urql
@urql/exchange-graphcache
is a normalized cache exchange for the urql
GraphQL client.
This is a drop-in replacement for the default cacheExchange
that, instead of document
caching, caches normalized data by keys and connections between data.
You can also pass your introspected GraphQL schema to the cacheExchange
, which enables
it to deliver partial results and match fragments deterministically!
urql
is already quite a comprehensive GraphQL client. However in several cases it may be
desirable to have data update across the entirety of an app when a response updates some
known pieces of data.
Learn more about Graphcache and normalized caching on our docs!
First install @urql/exchange-graphcache
alongside urql
:
yarn add @urql/exchange-graphcache
# or
npm install --save @urql/exchange-graphcache
You'll then need to add the cacheExchange
, that this package exposes, to your urql
Client,
by replacing the default cache exchange with it:
import { createClient, dedupExchange, fetchExchange } from 'urql';
import { cacheExchange } from '@urql/exchange-graphcache';
const client = createClient({
url: 'http://localhost:1234/graphql',
exchanges: [
dedupExchange,
// Replace the default cacheExchange with the new one
cacheExchange({
/* optional config */
}),
fetchExchange,
],
});
FAQs
A normalized and configurable cache exchange for urql
The npm package @urql/exchange-graphcache receives a total of 63,280 weekly downloads. As such, @urql/exchange-graphcache popularity was classified as popular.
We found that @urql/exchange-graphcache 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.