1 2 3 4 5 6 7 8 9 10 11 12 13 14
import fetch from 'cross-fetch'; import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client/core'; import { apollo as apolloConfig } from './config'; const cache = new InMemoryCache(); export const client = new ApolloClient({ cache, link: new HttpLink({ uri: apolloConfig.uri, fetch }), ...apolloConfig });