Skip to content

Details

Code: https://github.com/elovejoy5/sls-js-graphql-demo

So how do we setup a GraphQL API in under an hour?

First, we make a bunch of assumptions:

  • working AWS account
  • local environment with node, npm, serverless, editor, etc...
  • the network is going to be fast enough to let us connect to AWS in Oregon and deploy a few services
  • We can setup GraphQL, Lambda functions, roles, policies, userpools, etc... without explaining what all the services are and how they work

Second, we quickly set up a very hello-world GraphQL API:

  1. Start with a JavaScript Lambda function
  2. Add a Cognito user pool & a test account
  3. Add an Appsync instance with a super simple GraphQL API
  4. Quickly edit the lambda to support the GraphQL API
  5. Add a layer so that we can use a library without bundling it with the lambda
  6. Use the library to iterate on our API & Lambda function

Along the way, we'll probably look at yaml files, logging, environment variables, a quick-and-dirty react client, etc...

We'll attempt to live stream here: https://www.youtube.com/watch?v=U2ASfG69yRY

Related topics

You may also like