Can GraphQL Replace REST? A Study of Their Efficiency and Viability

Srinivas Vadlamani, Benjamin Emdon, Joshua Arts, Olga Baysal
{"title":"Can GraphQL Replace REST? A Study of Their Efficiency and Viability","authors":"Srinivas Vadlamani, Benjamin Emdon, Joshua Arts, Olga Baysal","doi":"10.1109/SER-IP52554.2021.00009","DOIUrl":null,"url":null,"abstract":"Representational State Transfer (REST) has traditionally been the standard web service architectural style for API creation. However, its popularity has been challenged with the introduction of GraphQL, an open source query language for APIs introduced by Facebook, in 2015. The latter has been quickly adopted by GitHub, Shopify, Airbnb, Twitter and more online portals are joining the list. In some instances, GraphQL has been adopted as an alternative architectural style or has been used in conjunction with REST.While GraphQL promises a considerable improvement over REST, much remains unexplored with respect to its efficiency and feasibility in its application. The goal of this paper is to determine viability of using GraphQL over REST for API architecture from quantitative and qualitative perspectives. A custom API client on GitHub is constructed to check on the response times and the corresponding magnitude of difference between REST and GraphQL. Thereafter, the paper surveyed employees of GitHub to understand software developers’ educated opinion and perceptions about REST and GraphQL based on their practical experience with APIs. The results show that both API paradigms have their benefits and weaknesses, and one cannot replace the other, at least in the near future.","PeriodicalId":259488,"journal":{"name":"2021 IEEE/ACM 8th International Workshop on Software Engineering Research and Industrial Practice (SER&IP)","volume":"43 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 IEEE/ACM 8th International Workshop on Software Engineering Research and Industrial Practice (SER&IP)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SER-IP52554.2021.00009","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

Abstract

Representational State Transfer (REST) has traditionally been the standard web service architectural style for API creation. However, its popularity has been challenged with the introduction of GraphQL, an open source query language for APIs introduced by Facebook, in 2015. The latter has been quickly adopted by GitHub, Shopify, Airbnb, Twitter and more online portals are joining the list. In some instances, GraphQL has been adopted as an alternative architectural style or has been used in conjunction with REST.While GraphQL promises a considerable improvement over REST, much remains unexplored with respect to its efficiency and feasibility in its application. The goal of this paper is to determine viability of using GraphQL over REST for API architecture from quantitative and qualitative perspectives. A custom API client on GitHub is constructed to check on the response times and the corresponding magnitude of difference between REST and GraphQL. Thereafter, the paper surveyed employees of GitHub to understand software developers’ educated opinion and perceptions about REST and GraphQL based on their practical experience with APIs. The results show that both API paradigms have their benefits and weaknesses, and one cannot replace the other, at least in the near future.
GraphQL能取代REST吗?它们的效率和可行性研究
代表性状态传输(Representational State Transfer, REST)传统上一直是API创建的标准web服务体系结构风格。然而,它的流行受到了GraphQL的挑战,GraphQL是Facebook在2015年推出的一种开源api查询语言。后者已迅速被GitHub、Shopify、Airbnb、Twitter和更多的在线门户网站所采用。在某些情况下,GraphQL被采用为一种可选的体系结构风格,或者与REST结合使用。虽然GraphQL承诺在REST上有相当大的改进,但在其应用程序的效率和可行性方面仍有许多有待探索的地方。本文的目标是从定量和定性的角度确定在API架构中使用基于REST的GraphQL的可行性。在GitHub上构建了一个自定义API客户端,用于检查REST和GraphQL之间的响应时间和相应的差异大小。之后,本文对GitHub的员工进行了调查,了解软件开发人员对REST和GraphQL的教育观点和看法,以及他们对api的实际经验。结果表明,这两种API范式各有优缺点,至少在不久的将来,一种API范式无法取代另一种API范式。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信