AWS | Typescript Apollo Lambda

This example provides a setup for a Lambda Graphql API with apollo

Clone This Example

Step #1 - npm install serverless -g
Step #2 - serverless install -u https://github.com/serverless/examples/tree/master/aws-node-typescript-apollo-lambda -n  aws-node-typescript-apollo-lambda

Apollo Lambda GraphQL API Example

This example demonstrates how to setup a lambda graphql API with apollo

  • I used apiKeys to secure the endpoints but you can add custom authorizers

Use Cases

  • Small graphql API
  • Creating a temporary lambda API that can easily be converted to standard GraphQL API

Setup

  • Setup your env file for AWS deployment with:

      • APOLLO_LAMBDA_KEY
      • NODE_ENV
  • sls deploy

Usage

  • To test it locally with serverless-offline by running: npm run dev
  • set x-api-key header with key your-api-key-that-is-at-least-characters-long

Future

  • Add support for subscription with Redis
view on Github

Latest commit b2f54ec on Sep 24, 2017

New to serverless?

To get started, pop open your terminal & run:

npm install serverless -g