Building a serverless GraphQL API in the AWS cloud?
GraphQL is an alternative to REST-like APIs and was designed to minimize the number of roundtrips, the main source of perceived latency for web applications. New to GraphQL? Check The path to GraphQL chapter for the motivation behind it.
AppSync is AWS's managed GraphQL solution. No capacity planning, scales to practically infinity, serverless-friendly, and it offers a managed real-time data interface. Never seen AppSync in action? Check out the Why AppSync? chapter.
Learn how to design, implement, and deploy an AppSync API from this book from the first steps to mastery.
Learn GraphQL
the graph-based API designed for speed and developer productivity from this book
Builds a solid understanding from the first steps to mastery. Provides the tools and concepts that you can use to build your own GraphQL API.
For developers
Written for people who write code. Plenty of code snippets, deploy-to-try example projects, best practices, and pitfalls are all covered in the book.
Multiple formats
Web-based version to use as a reference
PDF and Epub to read as a book.

Chapters included
GraphQL basics
If you know how to develop REST-like APIs, you'll learn how to develop GraphQL ones too.
AWS AppSync
Learn AWS's hosted GraphQL solution and how to host your backend on it.
Learn how to deploy the API with the AWS CDK or Terraform
Case studies
Step-by-step examples on how to develop realistic apps

What's in the package
Downloadable code examples25
FormatsWeb, PDF, Epub
Main language usedJavaScript
IaCTerraform, CDK
Updates includedAll future updates
Money-back guarantee7 days
Book statusFinished
Last updatedNov 14, 2023 - Updates


My journey with AppSync and GraphQL started when I joined a project at the end of the prototyping stage and my task was to start a parallel implementation of the backend using these technologies. In the first few days everything was smooth: because of the expressiveness of GraphQL implementing the basics was easy. I didn't need to think about what the clients will need, just expose the data and let them define the queries.

The first major block was implementing real-time data: subscriptions are easy to get started, but when I went on to add basic requirements, things started to get difficult. How can I send two notifications for one change with different data? How can I make sure some users can get some events but not everything?

This was the first major hurdle and I spent several weeks figuring out a solution that checked all the boxes. Then I moved on to implementing access control. It was again a thing that seems easy on tutorials but in practice there are many fine points that are not covered that well.

Overall, I spent about 2 months experimenting and finding ways around the limitations and quirks of AppSync and GraphQL. The idea for a book started from this experience: anybody who uses these technologies will need to go through similar steps, and having a guide with the best practices would be an enormous help. If I had this book when I started with AppSync that would have reduced the time from 2 months to maybe a week. And that's a massive improvement in terms of time needed to get started.

But even after the initial learning period I kept encountering topics that are not trivial to solve. Things like using signed URLs with AppSync for file handling or a custom authorizer for greater control over who can call the API. These are not hard problems but still require familiarity with different corners of AWS.

Then there were the truly hard problems that kept bugging me to figure out. Resilient subscriptions and efficient DynamoDB data modelling are in this category. Some of these problems took weeks to cover in sufficient depth.

This book is the repository of everything I know about AppSync and GraphQL with all the topics covered to help you develop a strong understanding of the technology.

Tamás Sallai

I'm a software developer focusing mostly on cloud computing and web technologies. I'm especially interested in how to handle edge cases to end up with dependable software.

When I started working with GraphQL I needed to do a lot of research until I felt I have a chance to start building a reliable and robust solution. This book aims to be the guide that covers everything you'll need to get you from working with REST-like APIs to AppSync.

Other books I wrote:

Is the book updated?

Check the updates page.

Is there a team license?

Contact me with your requirements and we'll figure something out:

Are there any discounts/promotions/purchasing power parity pricing?

Not at this moment

Is <topic x> included?

There is an extensive preview where you can check what topics are covered.