Skip to Content
Full Stack Serverless
book

Full Stack Serverless

by Nader Dabit
July 2020
Intermediate to advanced
181 pages
3h 53m
English
O'Reilly Media, Inc.
Content preview from Full Stack Serverless

Chapter 8. AWS AppSync In-Depth

In Chapter 3, we learned about GraphQL and created a basic GraphQL API. In this chapter, we’ll expand upon these concepts to create a music festival app using AWS AppSync, from this book’s GitHub repo.

This app will require the following:

  • Amazon DynamoDB tables will be used for shows and stages.

  • GraphQL API will be used for creating, reading, updating, deleting, and listing shows and stages.

  • Only admins should be able to create, update, or delete a show or a stage.

  • All users should be able to view shows and stages.

  • Relationships should be enabled between shows and stages.

  • Users should be able to view all shows as well as navigate to view show details.

Building Skills for GraphQL, AppSync API, and React Router

In this section, we’ll cover how to model relationships between GraphQL types, how to implement authorization rules on GraphQL types and fields, how to enable multiple authorization modes for an AppSync API, and how to enable route parameters using React Router.

First we’ll briefly cover each of these topics, and when we start building out the app, we will get into them in greater depth.

Relationships Between GraphQL Types

When creating a GraphQL API, or any API, modeling relationships between data becomes very important to understand. For example, the app that we are building will have the following two types:

Stage

This type will hold the stage information for individual performances, including the stage name and stage ID. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Full Stack Testing

Full Stack Testing

Gayathri Mohan

Publisher Resources

ISBN: 9781492059882Errata Page