Skip to content

Open sourcing GraphQL-query: 8.7x faster GraphQL query parser written in Rust

stellate.co
4 pointsmxstbr2 comments
On HN

Comments

Even in slow Ruby, querying to fulfill the request from MySQL is an order of magnitude slower than parsing it, making a speed jump not worth much effort. I'd love to have it backed by a db so fast that parsing time matters.

Absolutely, if you're building a GraphQL server, parsing is almost certainly not your bottleneck. Stellate is effectively a GraphQL CDN, so for us, it is.

Our request flow effectively boils down to:

1. Parsing a GraphQL query to assess which types and fields are within it

2. Matching the configured cache rules to those types and fields

3. Caching partial results accordingly

So, for our specific use case, parsing is one of the main things our edge gateway does, and reducing overhead there allowed us to significantly improve our overall performance.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.