Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mccallofthewild/apollo-cant-cache-me
Disables the Apollo Client cache
https://github.com/mccallofthewild/apollo-cant-cache-me
Last synced: 4 days ago
JSON representation
Disables the Apollo Client cache
- Host: GitHub
- URL: https://github.com/mccallofthewild/apollo-cant-cache-me
- Owner: mccallofthewild
- Created: 2018-01-07T18:55:21.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-07T19:24:04.000Z (almost 7 years ago)
- Last Synced: 2024-09-29T09:18:56.771Z (about 2 months ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Apollo Can't Cache Me
> A library for disabling Apollo Client Cache.## Usage
```javascript
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
})
})
);
```