Part 6: GraphQL Federation — TypeScript Gateway and Python Subgraph
Splitting a Monolith Without a Big Bang
┌─────────────────────────────────────────────────────────┐
│ Apollo Router (supergraph gateway — localhost:4000) │
└────────────────┬────────────────────────────────────────┘
│
┌───────────┴────────────┐
│ │
┌────▼────────────────┐ ┌────▼──────────────────────┐
│ TypeScript │ │ Python (Strawberry) │
│ Product Subgraph │ │ Inventory Subgraph │
│ localhost:4001 │ │ localhost:4002 │
│ @apollo/subgraph │ │ strawberry.federation │
└─────────────────────┘ └────────────────────────────┘Apollo Federation v2 Key Concepts
Term
Meaning
Step 1 — TypeScript Product Subgraph
Step 2 — Python Inventory Subgraph with Strawberry
Strawberry Schema with Federation
FastAPI Entry Point
Step 3 — Apollo Router
Install Rover CLI and Apollo Router
Compose the Supergraph Schema
Router Config
Start the Router
Step 4 — Cross-Service Query in Action
Docker Compose for Local Development
What's Next
Last updated