Home
Softono

Edge Graphql Dynamodb Api

Open source TypeScript
29
Stars
0
Forks
10
Issues
0
Watchers
3 years
Last Commit

 About Edge Graphql Dynamodb Api

Serverless GraphQL API on Edge with Global DynamoDB Tables

Platforms

Web Self-hosted

Languages

TypeScript

Need Help Installing Edge Graphql Dynamodb Api?

We provide expert installation service for this software. Our team will install, configure, and secure Edge Graphql Dynamodb Api on your server. plans start at just $30.

Edge Graphql Dynamodb Api

View on GitHub

Solution Diagram

Serverless GraphQL @ Edge + Global DynamoDB Tables

Why? Mostly for fun. I don't see too many practical use cases for such setup. Lambda@Edges aren't suitable for a lot of cases due to limited memory and CPU, so they are slow. If you need a globally available website with dynamic content, you should consider going with JAMStack served via CloudFront, Vercel or Cloudflare.

Features

  • Globally and highly available
  • GraphQL Server at each of Edge locations using Lambda@Edge + CloudFront
  • Globally replicated DynamoDB Tables
  • GraphQL handlers routing to the closest DynamoDB table as persistence layer
  • Pay-what-you-use model, no upfront or fixed charges, everything billed per-request
  • Infra managed using AWS-CDK and Typescript
  • Node functions packaged and minified automatically using Parcel, (there's a small bug though)

Useful commands

  • npm run build compile typescript to js
  • npm run deploy deploy this stack to your default AWS account/region

Limitations

  • Your server must be rather lightweight. Minified GraphQL Server code must be less than 1 MB. Lambda@Edge is restricted to 128MB of memory and 5000ms of timeout for VIEWER_REQUEST integration type.
  • Cannot use ENV variables
  • Table name is hardcoded, gonna fix that
  • Schema creation is laborious right now

Looking for cool DynamoDB editor? Check out Dynobase