Intended outcome:
I'm trying to implement storing a collection of notifications fully on the client side. However, the documentation contains plenty of references to cache.writeData that doesn't exist:
TS2339: Property 'writeData' does not exist on type 'InMemoryCache'.
I've implemented local type defs and resolvers using writeFragment and writeQuery for initial data, but the cache is not updated. The documentation on local state management is rather chaotic, as it discusses 10 things at a time, and requires jumping back and forth to "Caching" section. I wasn't able to find a good example of how to store a collection of simple objects in the cache, so that it feels like it was coming from the API actually.
Actual outcome:
I'd expect methods used in the documentation to exist
I'd expect more thorough and step-by-step explanation how to manage local state (beyond single primitive values) via react-apollo
Intended outcome: I'm trying to implement storing a collection of notifications fully on the client side. However, the documentation contains plenty of references to
cache.writeData
that doesn't exist:I've implemented local type defs and resolvers using
writeFragment
andwriteQuery
for initial data, but the cache is not updated. The documentation on local state management is rather chaotic, as it discusses 10 things at a time, and requires jumping back and forth to "Caching" section. I wasn't able to find a good example of how to store a collection of simple objects in the cache, so that it feels like it was coming from the API actually.Actual outcome:
How to reproduce the issue:
Version