GraphQLify: Automated and Type Safety-Preserving GraphQL API Adoption

πŸ“… 2026-04-16
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF

career value

177K/year
πŸ€– AI Summary
This work addresses key challenges in migrating existing REST APIs to GraphQLβ€”namely, type unsafety, high performance overhead, and tight coupling to specific data sources. The authors propose an automated migration approach based on static program analysis that accurately infers types to construct a type-safe GraphQL schema. By embedding a GraphQL server that directly reuses the original API logic, the method eliminates network calls and adapter-layer overhead. This approach achieves end-to-end type safety for the first time, demonstrating 100% conversion success and zero type errors across 834 REST endpoints from nine open-source projects. Compared to OASGraph, it substantially improves both correctness and performance, accelerating data retrieval by 2–4Γ—.

Technology Category

Application Category

πŸ“ Abstract
GraphQL provides a schema-based, strongly typed query language that enables highly efficient client-server communication. This paper introduces GraphQLify, an automated framework designed to migrate existing REST APIs to GraphQL. Unlike prior approaches that rely on relational databases, resource description frameworks (RDF), or machine-parsable specifications, GraphQLify leverages static source code analysis for precise type inference. This novel technique generates GraphQL schemas that guarantee end-to-end type safety, preserving a core advantage of adopting GraphQL. Furthermore, existing migration tools typically generate separate adapter servers, which introduce performance overhead via dynamic request binding and network latency. GraphQLify eliminates this by generating an embedded server that directly invokes the underlying API code, significantly improving performance. We evaluated GraphQLify on 834 APIs across nine popular open-source projects, where it successfully converted 100% of the APIs with zero type mismatches. In contrast, the current state-of-the-art tool, OASGraph, exhibited a 3.5% failure rate and a 42% type mismatch rate on the same dataset. Finally, our performance evaluation demonstrates that for workflows requiring five sequential API calls, clients using GraphQLify reduce data fetching time by a factor of 2 to 4 compared to their REST counterparts.
Problem

Research questions and friction points this paper is trying to address.

GraphQL migration
type safety
REST API
static analysis
API transformation
Innovation

Methods, ideas, or system contributions that make the work stand out.

GraphQL
type safety
static analysis
API migration
embedded server
πŸ”Ž Similar Papers
No similar papers found.