Skip to content
Source code for talk on creating SVG from AWS Lambda using Serverless and GraphQL
JavaScript
Branch: master
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.
charts
.gitignore
README.md
chart.js
data.js
data.json
package-lock.json
package.json
schemas.js
serverless.yaml

README.md

Serverless + GraphQL + SVG Talk code example

2019 Ændrew Rininsland (@aendrew)

This is all the code from my November 2019 talk at Trending.JS.

Here's what you should look at if you want to recreate something like this:

  • serverless.yaml: All the AWS Lambda config is in this. You'll need to tweak this to deploy
  • data.js: This is the GraphQL data handler for Serverless. It consumes mock data from data.json; normally you'd make requests to an API instead.
  • chart.js: This is the chart handler. It takes one path parameter, config, to fork between the basic and the advanced chart examples (both in /charts).
  • /charts: The actual chart generation code.
    • basic.js returns a simple SVG string.
    • advanced.js uses JSDOM + D3 to create a more realistic example.
  • schemas.js: GraphQL schemas. I've made these really trivial by design.
You can’t perform that action at this time.