]> git.r.bdr.sh - rbdr/forum/blob - src/lib/config/apollo.ts
Start migration to supabase
[rbdr/forum] / src / lib / config / apollo.ts
1 import fetch from 'cross-fetch';
2 import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client/core';
3 import { apollo as apolloConfig } from './config';
4
5 const cache = new InMemoryCache();
6
7 export const client = new ApolloClient({
8 cache,
9 link: new HttpLink({
10 uri: apolloConfig.uri,
11 headers: {
12 apiKey: apolloConfig.key
13 },
14 fetch
15 }),
16 ...apolloConfig
17 });