]> git.r.bdr.sh - rbdr/forum/blobdiff - src/config/apollo.js
Add tests for utils
[rbdr/forum] / src / config / apollo.js
index 4cfca79ba4b6eefd9b9f8b42f251cd3392a78d0c..a3820ed70355cc24a896c55e759874601c019865 100644 (file)
@@ -1,9 +1,14 @@
-import { ApolloClient, InMemoryCache } from '@apollo/client/core';
+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
 });