REST and GraphQL comparative analysis


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.


REST; GraphQL; API; application performance

M. Miłosz, Aplikacje internetowe - od teorii do praktyki, Polskie Towarzystwo Informatyczne, Warszawa, 2008.

What is an API?, Mulesoft,, [22.01.2021].

R. T. Fielding, Architectural Styles and the Design of Network-based Software Architectures, Dissertation, University of California, Irvine, 2020,, [01.12.2020].

P. Erlandsson, J. Remes, Performance Comparison between GraphQL, REST & SOAP, University of Skovde, Dissertation,, 2020, [19.01.2021].

G. Brito, M. T. Valente, REST vs GraphQL: A Controlled Experiment, IEEE International Conference on Software Architecture (ICSA), Salvador, Brazil, (2020) 81-91, doi: 10.1109/ICSA47634.2020.00016, [21.01.2021].

C. Oggier, How fast GraphQL is compared to REST APIs, Haaga-Helia University of Applied Sciences, 2020,, [28.01.2021].

T. Eizinger, API Design in Distributed Systems: A Comparison between GraphQL and REST, Master Thesis, University of Applied Science Technikum Wien, 2017, [20.01.2021].

M. Seabra, M. E. Nazario, G. Pinto, REST or GraphQL?: A Performance Comparative Study, Proceedings of the XIII Brazilian Symposium on Software Components, Architectures, and Reuse. Association for Computing Machinery, New York, NY, USA, 2019,, [29.01.2021].

Apache JMeter,, [20.11.2020].


Published : 2021-06-30

Margański, P., & Pańczyk, B. (2021). REST and GraphQL comparative analysis. Journal of Computer Sciences Institute, 19, 89-94.

Piotr Margański
Beata Pańczyk