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