GraphQL is an open-source query language and runtime for manipulating APIs. GraphQL was designed by Facebook in 2012 (and released publicly in 2015) to solve various weaknesses with traditional REST architecture by making a new system that is declarative, client-driven, and performant.
This series covers the basics of GraphQL, beginning with important terminology and concepts. You’ll also create an Express API server in Node.js that serves up a GraphQL endpoint, giving you hands-on practice with building a schema and using operations (such as queries and mutations) and resolver functions.
In this article, you will review what GraphQL is, familiarize yourself with important terminology and concepts of GraphQL, and discover how the GraphQL specification compares with the REST architectural style.
In this tutorial, you’ll make an Express API server in Node.js that serves up a GraphQL endpoint. You will also build a GraphQL schema based on the GraphQL type system, including operations such as queries and mutations, as well as resolver functions to generate responses for any requests. You will also use the GraphiQL integrated development environment (IDE) to explore and debug your schema and query the GraphQL API from a client.
GraphQL is a modern solution for facilitating the communication between a front end and a data source. In order to write a functioning GraphQL schema, you must understand the GraphQL Type System. In this article, you will learn about the five built-in scalar types, Enums, Object types (and the abstract types that work alongside them), and the List and Non-Null wrapping types. You will see examples for each type and learn how to use them to build a complete GraphQL schema.