September 2022
Intermediate to advanced
564 pages
9h 56m
English
GraphQL offers an alternative to HTTP requests for fetching data. It offers a whole bunch of additional features that can be added to data requests.
As with Redux, GraphQL systems can seem complicated, but TDD helps to provide an approach to understanding and learning.
In this chapter, we’ll use the Relay library to connect to our backend. We’re going to build a new CustomerHistory component that displays details of a single customer and their appointment history.
This is a bare-bones GraphQL implementation that shows the fundamentals of test-driving the technology. If you’re using other GraphQL libraries instead of Relay, the techniques we’ll explore in this chapter will also apply.
Here’s what the new CustomerHistory ...