aboutsummaryrefslogtreecommitdiff
path: root/src/config/apollo.js
blob: a3820ed70355cc24a896c55e759874601c019865 (plain)
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
});