REST and GraphQL comparative analysis

Main Article Content

DOI

Piotr Margański

piotr.marganski@gmail.com

Beata Pańczyk

b.panczyk@pollub.pl

Abstract

The article presents a comparative analysis of the two most commonly used API web design standards - REST and GraphQL. The time and size of HTTP responses returned by applications were tested. Two applications with the same functionalities, performing CRUD operations, on data stored in the non-relational MongoDB database were used for the research. Both applications were based on NodeJS technology. The JMeter tool was used to collect and analyze the data. On the basis of the obtained results, it was found that there were no significant differences in reading the data with a small number of queries and when removing resources. With the increase in the number of queries, a clear advantage of the REST standard was observed. The advantage of GraphQL, both in response time and size, was demonstrated when retrieving specific data.

Keywords:

REST, GraphQL, API, application performance

References

Article Details

Margański, P., & Pańczyk, B. (2021). REST and GraphQL comparative analysis. Journal of Computer Sciences Institute, 19, 89–94. https://doi.org/10.35784/jcsi.2473