UNPKG

ra-data-graphql

Version:

A GraphQL data provider for react-admin

15 lines 546 B
import { ApolloClient, HttpLink, InMemoryCache, } from '@apollo/client'; export default (options) => { if (!options) { return new ApolloClient({ cache: new InMemoryCache().restore({}), }); } const { cache = new InMemoryCache().restore({}), uri, credentials, headers, link = uri ? new HttpLink({ uri, credentials, headers }) : undefined, ...otherOptions } = options; return new ApolloClient({ link, cache, ...otherOptions, }); }; //# sourceMappingURL=buildApolloClient.js.map