Created
December 3, 2019 17:27
-
-
Save darahayes/8ed072d56617f60e692e0b1b067bbecd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApolloOfflineClient } from 'offix-client'; | |
import { InMemoryCache } from 'apollo-cache-inmemory'; | |
import { HttpLink } from "apollo-link-http"; | |
const config = { | |
link: new HttpLink({ uri: 'http://example.com/graphql' }) | |
cache: new InMemoryCache() | |
}; | |
// create the client | |
const client = new ApolloOfflineClient(config); | |
// initialise the client | |
await client.init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment