Example project for a GraphQL API build with Ruby and deployed to AWS Lambda
An example of how to build a GraphQL API with Ruby on AWS Lambda without Sinatra or Rails. Read the companion blogpost.
You need to these dependencies installed:
Clone this repo:
$ git clone https://github.com/oriolgual/serverless-ruby-graphql.git
$ cd serverless-ruby-graphql
$ bundle
$ npm install
Deploying to production is handled by CircleCI (make sure to add your repo to CircleCi and add AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY). If you need to deploy a development environment run:
$ npm run deploy:dev
curl -XPOST YOUR_LAMBDA_ENDPOINT -d '{post(id: 1) {id title}}'
app.rb
is the entry point of the application, it recieves the request handled from AWS and calls delegates everything to the schema.
app/
has a really simple demo GraphQL API.