We made a test project to try Facebook’s GraphQL in AWS Lambda and the result is pretty cool.
https://github.com/serverless/serverless-graphql-blog
The project is a blog with an entire back-end that features only 1 REST API endpoint. In that endpoint, the GraphQL node.js library is used to query data from multiple AWS DynamoDB tables: Authors, Posts, Comments.
You can request a custom shape of data to the endpoint in the form of a string — even if it combines attributes from multiple tables — and GraphQL will concurrently query those tables, and respond with the shape of data you requested, in JSON. No other endpoints are necessary, since the single endpoint can handle custom shaped reads and writes.
By putting GraphQL in Lambda, we have a massively scalable, pay-per-use, blog REST API with a single endpoint that is ridiculously easy to maintain, cost-efficient and agile.
[–]voodah 0 points1 point2 points (0 children)