apollo-cant-cache-me

1.0.0 • Public • Published

Apollo Can't Cache Me

A library for disabling Apollo Client Cache.

Usage

import { ApolloClient } from 'apollo-client'
import { disableCache } from 'apollo-cant-cache-me'
 
const GRAPHQL_URI = 'http://localhost:8080/graphql'
 
export const client = disableCache(
    new ApolloClient({
        link: new HttpLink({
            uri: GRAPHQL_URI
        }),
        cache: new InMemoryCache({
            dataIdFromObject: object => object.__id
        })
    })
);

Package Sidebar

Install

npm i apollo-cant-cache-me

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mccallalexander