Learning GraphQL Query Costs (Extended Version)

08/25/2021
by   Georgios Mavroudeas, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/11/2020

A Principled Approach to GraphQL Query Cost Analysis

The landscape of web APIs is evolving to meet new client requirements an...
research
09/21/2018

Generating GraphQL-Wrappers for REST(-like) APIs

GraphQL is a query language and thereupon-based paradigm for implementin...
research
10/17/2022

Estimating the Cost of Executing Link Traversal based SPARQL Queries

An increasing number of organisations in almost all fields have started ...
research
03/02/2020

Bridging the Gap Between Theory and Practice on Insertion-Intensive Database

With the prevalence of online platforms, today, data is being generated ...
research
09/02/2023

LeanContext: Cost-Efficient Domain-Specific Question Answering Using LLMs

Question-answering (QA) is a significant application of Large Language M...
research
03/18/2022

Configurable Per-Query Data Minimization for Privacy-Compliant Web APIs

The purpose of regulatory data minimization obligations is to limit pers...
research
07/14/2021

Querying the Most Granular Demographics Dataset

We have an API that allows you to query demographics data. Your data jus...

Please sign up or login with your details

Forgot password? Click here to reset