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 ...

Get Learn AWS Serverless Computing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.