An Empirical Study of GraphQL Schemas

07/30/2019
by   Erik Wittern, et al.
0

GraphQL is a query language for APIs and a runtime to execute queries. Using GraphQL queries, clients define precisely what data they wish to retrieve or mutate on a server, leading to fewer round trips and reduced response sizes. Although interest in GraphQL is on the rise, with increasing adoption at major organizations, little is known about what GraphQL interfaces look like in practice. This lack of knowledge makes it hard for providers to understand what practices promote idiomatic, easy-to-use APIs, and what pitfalls to avoid. To address this gap, we study the design of GraphQL interfaces in practice by analyzing their schemas - the descriptions of their exposed data types and the possible operations on the underlying data. We base our study on two novel corpuses of GraphQL schemas, one of 16 commercial GraphQL schemas and the other of 8,399 GraphQL schemas mined from GitHub projects. We make both corpuses available to other researchers. Using these corpuses, we characterize the size of schemas and their use of GraphQL features and assess the use of both prescribed and organic naming conventions. We also report that a majority of APIs are susceptible to denial of service through complex queries, posing real security risks previously discussed only in theory. We also assess ways in which GraphQL APIs attempt to address these concerns.

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
08/07/2023

Exploring Security Practices in Infrastructure as Code: An Empirical Study

Cloud computing has become popular thanks to the widespread use of Infra...
research
07/06/2023

A Logical Way to Negotiate Services

Service providers commonly provide only a fixed catalog of services to t...
research
09/21/2018

Generating GraphQL-Wrappers for REST(-like) APIs

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

PI2: Generating Visual Analysis Interfaces From Queries

Interactive visual analysis interfaces are critical in nearly every data...
research
03/27/2018

Proactive Empirical Assessment of New Language Feature Adoption via Automated Refactoring: The Case of Java 8 Default Methods

Programming languages and platforms improve over time, sometimes resulti...

Please sign up or login with your details

Forgot password? Click here to reset