O'Reilly logo

Full Stack Serverless by Nader Dabit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Creating Your First App

In the last chapter you created a basic API layer using a combination of API Gateway and serverless functions. This combination is very powerful but you have not yet interacted with a real database.

In this chapter, you will be creating a GraphQL API that interacts with a DynamoDB NoSQL database to perform CRUDL operations (create, read, update, delete, and list).

The app that you will be building is a Notes app. This app will allow users to create notes, update notes, and delete notes. It will also have GraphQL subscriptions enabled in order to see updates in real time. If another user is interacting with the app and they create a new note, our app will update with the new values in real-time.

Introduction to GraphQL

GraphQL is an increasingly popular API implementation that is an alternative to REST. In this chapter, you’ll learn what GraphQL is, why developers are adopting it, and how it works.

What is GraphQL

GraphQL is an API specification. It is a query language for APIs and a runtime for fulfilling those queries with your data. It is, and can be used as, a replacement for REST and has some similarities to REST.

GraphQL was introduced by Facebook in 2015 though it had been used internally since 2012 [1]. GraphQL allows clients to define the structure of the data that is required, and exactly that same structure is returned from the server. Requesting data in this way enables a much more efficient way for client-side applications to interact ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required