GraphQL is an open source web API language for reading and writing data that is maintained by Facebook. It allows the client to specify exactly what data is returned and request multiple data areas in a single request. This efficiency and flexibility makes it a compelling alternative to a REST API. GraphQL also supports both reading and writing data.
In this chapter, we'll start by experimenting with some GraphQL queries against GitHub to get familiar with the syntax by using the GitHub GraphQL API explorer. We'll explore how we both read and write GraphQL data and how to specify exactly the way we want the data in the response returned to us.
We'll then consume the GitHub GraphQL server in a React and TypeScript application to build a little app that searches for a GitHub repository and returns some information about it. We'll...