Is there anyway that I can check all the cache, eg: changes within apollo for debugging. Something like redux store, where you can view the whole state tree.
They mentioned:
The cache stores the objects by ID in a flat lookup table. https://www.apollographql.com/docs/react/caching/cache-configuration/
Any way to display/console the whole lookup table?
For @apollo/client v3
Found the answer, if anyone is interested.
InMemoryCache
You can console log the cache object where you create with InMemoryCache. You should be able to find it under your created cache:
const cache = new InMemoryCache({"...Your option"})
console.log(cache.data) // <- Your cache query
browser console
Through browser, use console to log data
__APOLLO_CLIENT__.cache.data
apollo
v3Access through apollo client cache
const client = useApolloClient();
const serializedState = client.cache.extract();
console.log(serializedState) <- your cache query