1 Introduction to GraphQL

This chapter covers

  • Understanding GraphQL and the design concepts behind it
  • How GraphQL differs from alternatives like REST APIs
  • Understanding the language used by GraphQL clients and services
  • Understanding the advantages and disadvantages of GraphQL

Necessity is the mother of invention. The product that inspired the creation of GraphQL was invented at Facebook because the company needed to solve many technical issues with its mobile application. However, I think GraphQL became so popular so fast not because it solves technical problems but rather because it solves communication problems.

Communication is hard. Improving our communication skills makes our lives better on many levels. Similarly, improving the communication between the different parts of a software application makes that application easier to understand, develop, maintain, and scale.

That’s why I think GraphQL is a game changer. It changes the game of how the different “ends” of a software application (frontend and backend) communicate with each other. It gives them equal power, makes them independent of each other, decouples their communication process from its underlying technical transport channel, and introduces a rich new language in a place where the common previously spoken language was limited to a few words.

1.1 What is GraphQL?

1.1.1 The big picture

1.1.2 GraphQL is a specification

1.1.3 GraphQL is a language

1.1.4 GraphQL is a service

1.2 Why GraphQL?

1.2.1 What about REST APIs?

1.2.2 The GraphQL way

1.2.3 REST APIs and GraphQL APIs in action

1.3 GraphQL problems

1.3.1 Security

1.3.2 Caching and optimizing

1.3.3 Learning curve

Summary

sitemap