createCacheUpdaterLink
createCacheUpdaterLink
creates an Apollo Link for Nau to manipulate the cache.
const httpLink = new HttpLink({ uri: 'http://localhost:4000/graphql' });
const cacheUpdaterLink = createCacheUpdaterLink();
const client = new ApolloClient({
cache: new InMemoryCache({
addTypename: true,
possibleTypes: introspectionResult.possibleTypes,
typePolicies: withCacheUpdater({}),
}),
link: from([cacheUpdaterLink, httpLink]),
});