Example project for a GraphQL API build with Ruby and deployed to AWS Lambda
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
.gitignore
Gemfile
Gemfile.lock
README.md
app.rb
package-lock.json
package.json
serverless.yml

README.md

Ruby GraphQL API on AWS Lambda

An example of how to build a GraphQL API with Ruby on AWS Lambda without Sinatra or Rails.

Installation

Clone this repo:

$ git clone https://github.com/oriolgual/serverless-ruby-graphql.git
$ cd serverless-ruby-graphql
$ bundle
$ npm install -g serverless

Deploy

$ sls deploy

Usage

  1. Grab the endpoint of your function after deploying
  2. Run curl -XPOST YOUR_LAMBDA_ENDPOINT -d '{post(id: 1) {id title}}'

Code structure

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.