walmartlabs / lacinia

GraphQL implementation in pure Clojure
http://lacinia.readthedocs.io/en/latest/
Other
1.82k stars 160 forks source link

Avoid stack overflow on very large queries #413

Closed hlship closed 2 years ago

hlship commented 2 years ago

In certain cases, very large queries could result in a StackOverflowError, because com.walmartlabs.lacinia.executor/walk-selections was implemented recursively; this changes its implementation to work with a queue, and adds other performance enhancements.

This would only affect applications making use of the "preview" functions in the executor namespace.