Writing a GraphQL compiler in Rust, a case study
summary
apollo-rs is a production compiler pipeline written in Rust that turns GraphQL SDL into a salsa-based database and an ergonomic query API, using rowan and ongrammer for a recursive-descent, lossless parser and memoized queries. The system is fault tolerant (it collects errors rather than panicking), emits precise diagnostics with Miet-style reporting, and in a demo surfaces four distinct errors then repairs the document; the compiler pipeline works and is already usable as apollo-parser and apollo-compiler crates.
AI-written summary · about
chapters (18)
- 0:00Intro
- 0:38Welcome
- 2:33Preface
- 5:28What is GraphQL compiler
- 7:41Why GraphQL
- 11:18Twitter Review
- 12:36Small demo
- 16:32compiler stages
- 18:47architecture
- 20:42recursive descent parsing
- 22:45fault tolerant parsing
- 24:33lossless parser
- 26:33GraphQL schema
- 29:19The database
- 30:35Query system
- 32:08Database of facts
- 33:06Schema
- 36:09Conclusion
related talks
06mGraphQL tooling in Rust
23mRewrite everything in Rust? What we learned from introducing Rust in Strawberry-GraphQL
23mWas It Worth It? Lessons from Implementing Two GraphQL Routers. In JavaScript & Rust
40mRust’s approach of getting things right
25mMaking Tools for Rust: An Introduction to the Compiler and How It Can Help You
15mBuilding Little Languages with Rust
06mLayered Configuration and Safe Hot Reload in Rust
01h 13mRust-Powered Fullstack GraphQL: From Actix-Web & Juniper Server to WASM Yew Client
