GraphQL - Accelerated
summary
Benchmarks use clinic flame to show GraphQL spends most CPU time parsing, validating and walking the AST on every request, so an LRU cache of parsed/validated queries in fastify-gql cuts work and yields about 3–4× throughput for typical enterprise apps. For hot queries a JIT step compiles validated ASTs into JavaScript (via controlled codegen/eval), adding ~30% on trivial cases and approaching ~2× on realistic complex queries; after that parsing and HTTP become the dominant bottlenecks.
AI-written summary · about
chapters (15)
- 0:00GraphQL Accelerated
- 2:12Nonstandard
- 7:20A popular community GraphQL framework is Apollo
- 7:45Makes prototyping easy!
- 8:36In the last few months, several customers felt GraphQL was underperforming compared to REST.
- 11:14On each and every request the server first has to parse the query to produce an Abstract Syntax Tree and then walk that to execute the query
- 13:09Caching!
- 14:13Experimental implementation
- 14:38Uses an LRU to cache stable queries
- 14:59npm install fastify-gal
- 16:21We did additional performance analysis using clinic flame
- 17:32on the fly code generation
- 20:49Using our improvements GraphQL becomes very competitive to rolling your own stack
- 22:28Come to our booth!
- 22:47Check out our workshop: A new way to profile async activity in Node.js.








