aboutsummaryrefslogtreecommitdiff
path: root/src/lib/config/apollo.ts
blob: 826fd288b2eb382630697797febd55ff242a8f8b (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
});