Off-campus WSU users: To download campus access dissertations, please use the following link to log into our proxy server with your WSU access ID and password, then click the "Off-campus Download" button below.

Non-WSU users: Please talk to your librarian about requesting this dissertation through interlibrary loan.

Access Type

WSU Access

Date of Award

January 2025

Degree Type

Dissertation

Degree Name

Ph.D.

Department

Computer Science

First Advisor

AMIANGSHU BOSU

Abstract

GraphQL is a query language and web API runtime that was developed by Facebook in 2012, open-sourced in 2015, and moved to the GraphQL Foundation in 2019. It defines a client-server paradigm that solves a number of challenges observed in previous protocols such as Representational State Transfer (REST). A powerful feature of GraphQL is its type-safe nested queries that empower clients to request precisely the data they need, thereby addressing issues of data over-fetching and under-fetching. Prior studies primarily focused on comparative assessments and migration feasibility from GraphQL to REST in addition to automation of testing, and federation solutions. Nonetheless, to the best of our knowledge, no studies have yet investigated the trends of the software community’s interest in GraphQL domain topics and the challenges they face. Additionally, despite the wide spectrum of the GraphQL domain, the difficulty software developers encounter while learning GraphQL, and the resource investment necessary for software organizations to adopt GraphQL, few scientific research works focused on the effective adoption of GraphQL. To address this research gap, this dissertation aims to improve the adoption of GraphQL among various software practitioners. Our target practitioners list includes software developers, library builders, software organizations, educators, and researchers.To achieve our objective, we conduct three studies as follows –(i) We investigate what GraphQL topics software practitioners discuss, their challenges, interests, and mapping to the architecture of the GraphQL ecosystem where one of our findings indicates that "GraphQL Java" and "Development Tools" are among the difficult GraphQL topics. We also noted that tools aiming to auto-generate GraphQL from existing systems such as "Prisma" are difficult and unpopular. Such findings motivate us to (ii) propose an approach to automate the migration of applications to support GraphQL using source-code static analysis and code generation with a prototype implementation in the Java programming language. Lastly, we identify null-safety as an incompatibility between the GraphQL specification and the Java programming language, and therefore, (iii) we propose a tool to automate and enhance the null-safety of Java methods using code generation combined with an optional type hierarchy. Our results identify a broad range of 14 GraphQL topics that software developers discuss online on StackOverflow with varying sizes, contents, difficulty, and interests. Our findings indicate that Apollo, the reference GraphQL implementation, is among the most popular topics, especially on the client side of the GraphQL architecture. A second finding shows that topics representing basic GraphQL concepts such as queries, mutations, and resolvers are the least difficult. A third finding suggests that backend (server-side) implementations of GraphQL are less difficult and less popular than their front-end (client-side) counterparts. However, despite the popularity of "GraphQL Java", a programming language predominantly utilized for backend development, it is a difficult topic. As this finding motivates our second study, we propose an approach to automate the migration of programming-language APIs (particularly Java) to GraphQL, without requiring third-party domain knowledge expertise. We evaluate GraphQLify’s prototype implementation in Java on 9 open-source projects to assess the correctness and migration performance. We also compare it with one state-of-the-art solution, OASGraph, and show GraphQLify’s ability to preserve type safety. As part of our effort to improve GraphQL in the Java domain, our third study focuses on creating a Java tool (i.e., Optional4J) to automate the null safety of Java methods. That is because the GraphQL schema allows nullable and non-null types whereas, all Java types are nullable. Our quantitative results validate the correctness of Optional4J’s code generation to reduce boilerplate and show it outperforms its Java-native counterpart. For user evaluation, we conducted a survey with 15 developers from a well-known company and our results indicate developers find Optional4J useful and easy to use.

Off-campus Download

Share

COinS