1

I'm having trouble nailing how useQuery updates the Apollo Client cache. I observe that when useQuery is first called, what ever is retrieved has __typename added to it, if it's multiple items, they each get there own __typename.

What happens when I refetch with fetchmore or refetch? Is there any cache interaction? If I wanted to add those items to cache, how would I do that?

Peter Kellner
  • 14,748
  • 25
  • 102
  • 188
  • read docs? specific problem/code? there is a apollo browser tool ... provider component store content can be explored – xadm Oct 19 '20 at 21:53
  • I have read the docs a lot and there is no call out regarding cache interactionI can find. I am using chrome extension to view cache. That's how I know nothing new is added to it. – Peter Kellner Oct 19 '20 at 22:36
  • sadly it's not reliable tool ... explore code, set breakpoints ... pretty all requests results are written to cache before passing to components ... you can access cache from code to check for some key existence – xadm Oct 19 '20 at 22:56

0 Answers0