Repository URL to install this package:
|
Version:
0.2.0 ▾
|
import { ApolloClient } from 'apollo-client';
import { ApolloLink } from 'apollo-link';
export interface CreateApolloClientOptions {
link: ApolloLink;
}
/**
* @example
* import { createApolloClient, consoleLink, errorLink, httpLink, persistCache } from 'create-apollo-client'
* // create your own stateLink if you want, put it before httpLink
* const link = ApolloLink.from([consoleLink, errorLink, stateLink, httpLink])
* export const { client, cache } = createApolloClient({ link })
* // use client side query persistance, note, this is slow
* persistCache()
*/
declare function createApolloClient(options: CreateApolloClientOptions): {
client: ApolloClient<any>;
cache: import("apollo-cache-inmemory/lib/inMemoryCache").InMemoryCache;
};
export { createApolloClient };