2022-07-12 10:55:28 +02:00
|
|
|
import { ApolloClient, NormalizedCacheObject } from "@apollo/client/core";
|
2021-09-29 20:24:55 +02:00
|
|
|
import buildCurrentUserResolver from "@/apollo/user";
|
2022-07-12 10:55:28 +02:00
|
|
|
import { cache } from "./apollo/memory";
|
|
|
|
import { fullLink } from "./apollo/link";
|
2018-11-06 10:30:27 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
export const apolloClient = new ApolloClient<NormalizedCacheObject>({
|
2018-12-21 15:41:34 +01:00
|
|
|
cache,
|
2019-12-03 11:29:51 +01:00
|
|
|
link: fullLink,
|
2018-12-21 15:41:34 +01:00
|
|
|
connectToDevTools: true,
|
2019-09-02 14:35:50 +02:00
|
|
|
resolvers: buildCurrentUserResolver(cache),
|
2019-01-18 14:47:10 +01:00
|
|
|
});
|