GraphQL for Modern Commerce

Book description

REST APIs are great, but when you have to make individual requests to 10, 20, 30, or more of them to render a page or screen, they can become a bit cumbersome for your frontend developers. Facebook solved these challenges by inventing and later open-sourcing GraphQL.

Rather than requesting data from each API individually, GraphQL allows frontend developers to build a query asking for all of the data that’s needed, no matter which REST APIs actually contain the data. The GraphQL server then retrieves the data and returns it to the frontend developer in a single JSON document. Having been pioneered by Facebook, Twitter, and many of the other Silicon Valley giants, GraphQL is just starting to be used in the commerce domain.

In this practical guide, you’ll learn:

  • The challenges of using REST APIs on their own
  • How GraphQL complements REST APIs
  • The origins of GraphQL and its ongoing governance model
  • About the GraphQL specification
  • How GraphQL clients and servers work

Product information

  • Title: GraphQL for Modern Commerce
  • Author(s): Kelly Goetsch
  • Release date: February 2020
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492056843