Learning GraphQL Query Costs (Extended Version)
Not on the map. Why?
Abstract (arXiv)
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 static query analysis have had limited success because they tend to grossly overestimate cost. We propose a machine-learning approach to efficiently and accurately estimate the query cost. We also demonstrate the power of this approach by testing it on query-response data from publicly available commercial APIs. Our framework is efficient and predicts query costs with high accuracy, consistently outperforming the static analysis by a large margin.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 9 of its 27 references that are in the map. First posted on arXiv 25 Aug 2021.
Builds on
9 of 27 references.
References · 9
- 2017graph2vec: Learning Distributed Representations of Graphscited by 228
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
- 2017Learning to Represent Programs with Graphscited by 219
- 2019Plan-Structured Deep Neural Network Models for Query Performance Predictioncited by 24
- 2020Lale: Consistent Automated Machine Learningcited by 4
- 2019Migrating to GraphQL: A Practical Assessmentcited by 3
- 2020REST vs GraphQL: A Controlled Experimentcited by 2
- 2019An Empirical Study of GraphQL Schemascited by 1
- 2020A Principled Approach to GraphQL Query Cost Analysiscited by 1
Built on by
Not cited yet.