Carleton University - School of Computer Science Honours Project
Fall 2019
Thesis Proposal The Viability of GraphQL over REST for API Architecture
Benjamin Emdon
SCS Honours Project Image
ABSTRACT
Representational State Transfer (REST) is currently the most common API protocol in the web industry. REST-compliant web services make their resources available through specified HTTP endpoints. Each resource requires its request. One of the major limitations of REST is that API users often require multiple related resources at a time, resulting in multiple round trip requests to fetch each resource. In recent years, Facebook developed a competing API protocol called GraphQL which has been adopted by a few companies. GraphQL offers a comprehensive API protocol that claims to address some of the issues with REST. One major advantage of GraphQL over REST is that API users are given the capability to, in a single request, request all and only the resources they need. While GraphQL promises a considerable improvement over REST, much remains unexplored with respect to its efficiency and feasibility in its application. As such, the goal of this thesis will be to determine the level of viability (or lack thereof) of using GraphQL over REST for API architecture, to ultimately make a recommendation on its use cases. GitHub, the platform for open and closed source software collaboration, was an early adopter of GraphQL in 2016. Since then, GitHub has maintained one of the largest and most used GraphQL APIs in the industry. GitHub has been kind enough to grant this study access to survey its employees and analyze its public APIs to further the industry's knowledge on this topic.