The tutorial shows how you can build up on a mocked GraphQL server for writing tests for your Apollo Client queries and mutations in React. So far, the Apollo Client instance can be replaced with a mock, but the unsolved question keeps popping up: How to test Apollo Client in a React application?
Learn how to build a fully working GraphQL server with Apollo Server and Express with authentication, authorization, pagination, subscription, database access.
Finding the right solution a given problem is not always simple, and web applications like GraphQL are a good example of how changing times make for constantly evolving challenges. Moreover, evolving challenges create a scenario where the solutions must also evolve, so even the number of choices becomes a task. This article will decipher the pros and cons of one such solution: Apollo for GraphQL.
The application that you are going to build this tutorial should show you one approach of how Redux can be used together with Apollo Client in a React application. It gives you a implementation-wise scenario on how it can be done and is also followed by a couple of recommendations on how to use Redux and Apollo Client together in a larger applications.
It's time to get you started with a minimal Apollo Client in React application that can be used as boilerplate project. The application can be used as starter project for other tutorials, but also for your own ideas. After all, it gives you all the necessary parts to consume GitHub's GraphQL API in your React application by using Apollo Client in a minimal starter project.
Often you run into the case where you have to mock your GraphQL server for your GraphQL client application. It can be for testing your GraphQL client or when your GraphQL server is not (always) available for development. Then it comes in handy to know how to mock your GraphQL server. The following tutorial will show you how to do it for Apollo Client which is used in a React application.
A tutorial about how to use Apollo Link State as local state management solution in a React application when having already a GraphQL powered server in the first place. The example shows you how to use Apollo Link State instead of React's Local State, but also instead of Redux or MobX to manage global state.