Skip to Content
Learn AWS Serverless Computing
book

Learn AWS Serverless Computing

by Scott Patterson
December 2019
Intermediate to advanced
382 pages
9h 43m
English
Packt Publishing
Content preview from Learn AWS Serverless Computing

Lambda-backed endpoint

You can actually use a combination of API Gateway and Lambda to implement a GraphQL API. Within API Gateway, create a proxy endpoint with one route: /graphql. The following diagram shows that it looks much the same as the API Gateway and Lambda combination that we're already used to:

Non-REST-compliant API that exposes an endpoint with a /graphql route

This endpoint will send requests with the POST verb to the backend lambda for processing. Queries and mutations will be parsed and converted into the data source's native query language—whether that be SQL or an AWS SDK request.

In Node.js, there's a package called graphql ...

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.
Start your free trial

You might also like

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Sunil Gulabani

Publisher Resources

ISBN: 9781789958355