Gatsby

The Dynamic Site Generator

Gatsby

The Ephemeral API Generator

Nice to haves

Gatsby blog

GraphQL

What's covered

Overview of Gatsby

Build a blog static

Implement favourites dynamic

Implement courses hybrid - dynamic but better

Gatsby Overview

Gatsby

Building a blog

Demo

Favourites

Demo

Courses

Use same API?

👍 Gated content

👎 Maintaining API

👎 Different sources of truth

👎 REST APIs are not cool

Markdown files?

👍 Markdown is cool

👍 Awesome workflow

👍 Consistent with blog

👍 Versioned with Git

👎 Everything would be public

Hybrid

API handles authorization rules

Write course content in markdown

Use Gatsby's build to populate DB

DB not the single source of truth (ephemeral)

Hybrid

👍 Gated content

👍 Markdown is cool

👍 Awesome workflow

👍 Consistent with blog

👍 Versioned with Git

Demo

Summary

Blog static - buildtime

Favourites dynamic - runtime

Courses hybrid

What's next?

Use build step more!

This is not limited to Gatsby!

Questions?

Gatsby and Ephemeral APIs - React Europe

By dijonmusters

Gatsby and Ephemeral APIs - React Europe

  • 328