Welcome back! Today we take Day 1's single API and turn it into a production-grade supergraph: federated services behind Apollo Router, schema management with Rover and GraphOS, authorization for PII, caching, and error handling.
- Eve Porcello: Twitter | Email
- Moon Highway Training: Website | Mailing List | Articles
-
Node 20+ (
node --version) -
Rover CLI:
curl -sSL https://rover.apollo.dev/nix/latest | sh rover --version -
A free GraphOS Studio account (for the schema-management and managed-federation labs)
-
Clone this repo — each project in
projects/installs independently withnpm install
| # | Lesson | Hands-on |
|---|---|---|
| 01 | Microservices & Federation Overview | — |
| 02 | Subgraphs, Entities & Reference Resolvers | 03-snowtooth-supergraph demo · Lab: Pet Library Supergraph |
| 03 | The Router, Rover & Managed Federation | Lab: Monolith schema management |
| 04 | Graph Security & Authorization Strategies | Lab: Attack & protect Snowtooth |
| 05 | Caching, Error Handling & Performance | 01-snowtooth-monolith npm run cached demo |
| Project | What it is | Ports |
|---|---|---|
01-snowtooth-monolith |
Day 1's API as one graph + response-caching demo | 4000 |
02-san-diego-api |
Tiny monolith for the Rover/GraphOS lab | 4000 |
03-snowtooth-supergraph |
Lifts + Trails subgraphs composed by Apollo Router | 4001, 4002 → router 4000 |
04-federated-pets |
Pet Library as a two-subgraph lab | 4003, 4004 → router 4000 |
05-snowtooth-security |
Unprotected start/ vs. hardened finished/ |
4000 |
Projects that share port 4000 are used in different sessions — stop one before starting the next.
- OWASP GraphQL Cheat Sheet
- Router authorization (
@authenticated,@requiresScopes) - Demand control (depth & cost limits in the router)
- Persisted queries / trusted documents
- Server-side caching
- Apollo Client caching
- Subgraph error inclusion
- 200 OK! Error handling in GraphQL (Sasha Solomon)
- DataLoader
| Package | Version | Notes |
|---|---|---|
@apollo/server |
^5 | Node 20+, graphql ≥ 16.11 |
@apollo/subgraph |
^2.14 | Federation 2.9 schemas |
| Rover | latest | rover dev runs a local router |
Thanks for a great two days — keep in touch! ✉️ eve@moonhighway.com
