Skip to content

Instantly share code, notes, and snippets.

@darahayes
Created December 3, 2019 17:27
Show Gist options
  • Save darahayes/8ed072d56617f60e692e0b1b067bbecd to your computer and use it in GitHub Desktop.
Save darahayes/8ed072d56617f60e692e0b1b067bbecd to your computer and use it in GitHub Desktop.
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