December 2019
Intermediate to advanced
474 pages
10h 3m
English
Not only can you use Apollo Client to manage the data that is fetched from the GraphQL server, but you can also use it for managing the local state. With Apollo, it becomes easy to combine local state with data from the GraphQL server since you can also use queries and mutations to deal with the local state.
A good example of information you might want to put in your local state for this e-commerce store is the number of products that should be requested from the GraphQL server. In the first part of this chapter, you already created a query that takes a parameter called limit, which defines how many products will be returned.
To add local state to your application, some changes need to made to the setup of Apollo Client, ...