This chapter teaches you how to consume GraphQL APIs. As we learned in chapter 8, GraphQL offers a query language for web APIs, and in this chapter you’ll learn how to use this language to run queries on the server. In particular, you’ll learn how to make queries against a GraphQL API. You’ll learn to explore a GraphQL API to discover its available types, queries, and mutations. Understanding how GraphQL APIs work from the client side is an important step toward mastering GraphQL.
Learning to interact with GraphQL APIs will help you learn to consume the APIs exposed by other vendors, it’ll let you run tests against your own APIs, and it’ll help you design better APIs. You’ll learn to use the GraphiQL client to explore and visualize a GraphQL API. As you’ll see, GraphiQL offers an interactive query panel that makes it easier to run queries on the server.