Learning GraphQL Query Costs (Extended Version)
Georgios Mavroudeas, Guillaume Baudart, Alan Cha, Martin, Hirzel, Jim A. Laredo, Malik Magdon-Ismail, Louis Mandel, Erik, Wittern

TL;DR
This paper introduces a machine-learning framework to accurately and efficiently estimate the cost of GraphQL queries, addressing the limitations of static analysis and improving resource management for API providers.
Contribution
It presents a novel machine-learning approach for estimating GraphQL query costs, outperforming traditional static analysis methods in accuracy and efficiency.
Findings
Machine learning predicts query costs with high accuracy.
The approach outperforms static analysis by a large margin.
Framework tested on real-world API data.
Abstract
GraphQL is a query language for APIs and a runtime for executing those queries, fetching the requested data from existing microservices, REST APIs, databases, or other sources. Its expressiveness and its flexibility have made it an attractive candidate for API providers in many industries, especially through the web. A major drawback to blindly servicing a client's query in GraphQL is that the cost of a query can be unexpectedly large, creating computation and resource overload for the provider, and API rate-limit overages and infrastructure overload for the client. To mitigate these drawbacks, it is necessary to efficiently estimate the cost of a query before executing it. Estimating query cost is challenging, because GraphQL queries have a nested structure, GraphQL APIs follow different design conventions, and the underlying data sources are hidden. Estimates based on worst-case…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware System Performance and Reliability · Data Quality and Management · Advanced Graph Neural Networks
