Company
Date Published
Author
Tom Coleman
Word count
970
Language
English
Hacker News points
None

Summary

The development of Apollo Optics, a GraphQL performance and usage monitoring software product, has revealed differences in the execution models of GraphQL servers, particularly when using Ruby. The reference JavaScript GraphQL server agent is production-ready, while an initial beta version for Ruby-based servers has been built. The author experimented with GitHunt's API server written in Ruby on Rails, comparing its execution model to a NodeJS reference implementation. They discovered that Ruby's default execution strategy leads to serial execution and long query times, but found ways to improve performance using the graphql-batch gem and parallelization techniques. A true "parallel async" execution model is being discussed in the graphql-ruby repo, which could drastically improve request latencies. The author believes Optics will help drive this development forward by visualizing data and informing each other's execution strategies.