You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 10, 2019. It is now read-only.
Should I call them separately in the component or somehow make a unified resolver functions in Client State? Or should I create some actions like in redux?
I'm not sure how to make it do things I did with redux, i.e. receiving data from the server and save it in cache with specific keys quite easily.
Maybe I'm misunderstanding the whole concept. I've read the docs and other articles but they are usually all just about local caching, not about dealing with remote and local data together smoothly.
I couldn't really find a standard example source showing how to keep fetched graphql results in the cache, more like, systematically. I believe the idea of apollo and graphql can make things much easier than redux.
The text was updated successfully, but these errors were encountered:
tresdev
changed the title
howshould I update local state after fetching remote data?
How should I update local state after fetching remote data?
Nov 30, 2018
Well it's more like a question, but so far I'm kinda confused about when to update local state, after fetching data from Remote GraphQL API Server.
For example, I have records of customers in the database and I want to get the information of some customers and save it in cache right away.
So, for fetching from server, it can be like this:
and to update local cache,
Should I call them separately in the component or somehow make a unified resolver functions in Client State? Or should I create some actions like in redux?
I'm not sure how to make it do things I did with redux, i.e. receiving data from the server and save it in cache with specific keys quite easily.
Maybe I'm misunderstanding the whole concept. I've read the docs and other articles but they are usually all just about local caching, not about dealing with remote and local data together smoothly.
I couldn't really find a standard example source showing how to keep fetched graphql results in the cache, more like, systematically. I believe the idea of apollo and graphql can make things much easier than redux.
The text was updated successfully, but these errors were encountered: