Welcome to Manning India!

We are pleased to be able to offer regional eBook pricing for Indian residents.
All eBook prices are discounted 40% or more!
GraphQL in Action
Samer Buna
  • MEAP began December 2019
  • Publication in Summer 2020 (estimated)
  • ISBN 9781617295683
  • 375 pages (estimated)
  • printed in black & white

Provides a great overview to GraphQL. The explanations are clear and the code examples are extremely relevant.

Dary Merckens
Reduce bandwidth demands on your APIs by getting only the results you need—all in a single request! The GraphQL query language simplifies interactions with web servers, enabling smarter API queries that can hugely improve the efficiency of data requests. In GraphQL in Action, you’ll learn how to bring those benefits to your own APIs, giving your clients the power to ask for exactly what they need from your server, no more, no less. Practical and example-driven, this book teaches everything you need to get started with GraphQL—from design principles and syntax right through to performance optimization.
Table of Contents detailed table of contents

Part 1: Exploring GraphQL

1 Introduction to GraphQL

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

1.4 Summary

2 Exploring GraphQL APIs

2.1 The GraphiQL Editor

2.2 The Basics of the GraphQL Language

2.2.1 Requests

2.2.2 Fields

2.3 Examples from the GitHub API

2.3.1 Reading Data From GitHub

2.3.2 Updating Data at GitHub

2.3.3 Introspective Queries

2.4 Summary

3 Customizing and Organizing GraphQL Operations

3.1 Customizing Fields with Arguments

3.1.1 Identifying a single record to return

3.1.2 Limiting the number of records returned by a list field

3.1.3 Ordering records returned by a list field

3.1.4 Paginating through a list of records

3.1.5 Searching and filtering

3.1.6 Providing input for mutations

3.2 Renaming Fields with Aliases

3.3 Customizing Responses with Directives

3.3.1 Variables and input value

3.3.2 The @include directive

3.3.3 The @skip directive

3.3.4 The @deprecated directive

3.4 GraphQL Fragments

3.4.1 Why fragments?

3.4.2 Defining and using fragments

3.4.3 Fragments and DRY

3.4.4 Fragments and UI components

3.4.5 Inline Fragments for Interfaces and Unions

3.5 Summary

Part 2: Building GraphQL

4 Designing Schema Models

5 Implementing Schema Resolvers

6 Resolving Database Models and Relations

7 Optimizing Data Fetching

8 Implementing Mutations and Subscriptions

Part 3: Using GraphQL

9 Using GraphQL Without a Client

10 Using GraphQL with Apollo

11 Using GraphQL with Relay

About the Technology

The type-based GraphQL query language solves issues with over- or under-fetching data from an API, providing client apps with a predictable interface for interacting with a server. By organizing data as types and fields, GraphQL gives apps complete control over what they’re requesting, including data format, how much to fetch, and more. The result is faster transfer roundtrips, errors that are easier to spot, and virtually no need for clients to write time-consuming manual parsing code. Language-agnostic, GraphQL can be used with any language and incorporated easily into your existing stack.

About the book

In GraphQL in Action, you’ll learn to use GraphQL to simplify interactions with your web servers and improve the performance of your data APIs. Twenty-year web development veteran Samer Buna starts by introducing GraphQL’s unique query-based API paradigm, laying out its unique design concepts and advantages over traditional APIs. From there, you’ll master the GraphQL way of creating APIs for hierarchical data, unlock easy ways to incorporate GraphQL into your existing codebase, and learn how to consume a GraphQL API with queries, mutations, and subscriptions using the GraphQL query language. When you’re done, you’ll have all the skills you need to get started writing and using scalable data APIs with GraphQL. GraphQL is a new paradigm. Are you ready?

What's inside

  • Define a GraphQL schema for relational and document databases
  • Query services and other APIs efficiently
  • Optimize GraphQL resolvers with data caching and batching
  • Cache a data graph for clients
  • Design GraphQL fragments that match UI components' data requirements

About the reader

For web developers familiar with building client-server applications.

About the author

Samer Buna has over 20 years of experience in software development including front-ends, back-ends, mobile apps, API design, databases, and scalability. He operates jsComplete.com.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook
Prices displayed in rupees will be charged in USD when you check out.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks