Graph

The Graph pattern is based on the GraphQL standard that was proposed by Facebook. It is an emerging technology with the objective to provide an alternative to RESTful APIs. Since it is growing in popularity among serverless projects, it deserves a section in this book.

In this pattern, we have just one Lambda function with a single endpoint. This endpoint is a query that will trigger the GraphQL to fetch the corresponding data in any form that the client needs:

Having just one endpoint is not a restriction. You can have multiple endpoints, but the objective of this pattern is to reduce the number of interfaces.

The serverless.yml file ...

Get Building Serverless Web Applications 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.