Skip to content

Instantly share code, notes, and snippets.

@derek-fong
Created August 5, 2020 13:18
Show Gist options
  • Select an option

  • Save derek-fong/44eee3fdcc037b70017faab91f044890 to your computer and use it in GitHub Desktop.

Select an option

Save derek-fong/44eee3fdcc037b70017faab91f044890 to your computer and use it in GitHub Desktop.
How to Build a Serverless Apollo GraphQL Server with AWS Lambda, Webpack and TypeScript
service: demo-apollo-server-lambda
provider:
name: aws
runtime: nodejs12.x
region: ap-southeast-2
functions:
graphql:
handler: src/apollo-server.graphqlHandler
events:
- http:
path: graphql
method: post
cors: true
- http:
path: graphql
method: get
cors: true
plugins:
- serverless-webpack
- serverless-offline
custom:
webpack:
includeModules: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment