SINGH-THESIS-2021.pdf (1.67 MB)
Download file

Creating Adaptive GraphQL Client for Github Repo Analysis Using Scala Macros

Download (1.67 MB)
posted on 01.05.2021, 00:00 by Ashesh K Singh
GraphQL is a data query language and specification originally developed by Facebook. There are GraphQL runtimes on both — client-side and server-side in several languages that implement the GraphQL Specification. Basic client implementations in general-purpose languages like Java/Javascript mostly deal with GraphQL queries as strings; hence, the language’s underlying type system remains underutilized. More sophisticated client implementations provide Domain Specific Language (DSL) based on some input GraphQL schema (e.g., GitHub) to present increased type safety. However, the mismatches between data schemata and how programs use the data elements known as impedance mismatch make programs written with DSLs challenging to update. The language data types often do not match the corresponding GraphQL schema types. These problems make the creation, maintenance, and evolution of GraphQL clients difficult. Addressing these problems means a significant investment of programmers’ time since they would have to manually map each type in the GraphQL Schema to a corresponding type in the programming language. Not only is this process error-prone, but it might not even be feasible if the input schema is large. We address these issues by implementing a client that provides a custom DSL and automatically maps types from GraphQL schema to the corresponding types in the programs written using this DSL. As a result of both, we improve type-safety of GraphQL programs using our client and reduce the development effort on the user’s end. We accomplished this by using experimental Scala metaprogramming capabilities (macros). Using our client on GitHub’s GraphQL schema, it is possible to efficiently conduct studies such as vulnerability dependency analysis of software repositories.



Grechanik, Mark


Grechanik, Mark


Computer Science

Degree Grantor

University of Illinois at Chicago

Degree Level


Degree name

MS, Master of Science

Committee Member

Buy, Ugo Polakis, Jason

Submitted date

May 2021

Thesis type




Usage metrics