Performance evaluation of REST and GraphQL API aproaches in data retrieval scenarios using NestJS
Article Sidebar
Open full text
Issue Vol. 36 (2025)
-
Classification of cyber attacks in IoMT networks using deep learning: a comparative study
Asif Rahman Rumee232-242
-
Assessing the memorability and usability of the Gutenberg Editor Interface in the Drupal CMS
Paweł Iwon, Marek Miłosz243-250
-
Analysis of the directions of development of digital aesthetics on the example of Windows interfaces
Maksymilian Cegiełka, Marek Miłosz251-257
-
Analysis of the effectiveness of the portal integrating various tender platforms
Adrian Krzysztof Jedynak, Marek Miłosz258-261
-
Review and assessment of the quality of applications related to diet man-agement using the Mobile App Rating Scale (MARS)
Kamil Lewartowski, Marek Miłosz262-265
-
Comparison of the accessibility of websites of voivodeship cities in Poland
Dawid Drzewiecki, Marek Miłosz266-270
-
Study of factors affecting the performance of web applications on mobile devices
Jarosław Królikowski, Marek Miłosz271-277
-
The impact of changing graphic settings on performance in selected video games
Łukasz Stanik, Marek Miłosz278-283
-
Analysis of the use of Angular and Svelte products in mobile web applications
Michał Nurzyński, Marcin Badurowicz284-288
-
Comparative analysis of web and mobile interfaces of popular sales portals
Kacper Dudek, Marek Miłosz289-295
-
Comperative analasys of JavaScript runtime environments
Konrad Kalman, Marek Miłosz296-302
-
Image classification using PyTorch and Core ML
Jakub Ślusarski, Arkadiusz Szumny, Maria Skublewska-Paszkowska303-311
-
Analysis of ergonomics and security of email software
Marceli Szarapajew, Tomasz Szymczyk312-319
-
Comparative analysis of Cypress and Playwright frameworks in end-to-end testing for applications based on Angular
Przemysław Gosik, Marek Miłosz320-327
-
Password managers: a critical review of security, usability, and innovative designs
Hussein Abdulkhaleq Saleh328-335
-
Benchmarking the performance of Python web frameworks
Bartłomiej Bednarz, Marek Miłosz336-341
-
Comparison of chosen image classification methods on Android
Mariusz Zapalski, Patryk Żabczyński, Paweł Powroźnik342-349
-
Performance evaluation of REST and GraphQL API aproaches in data retrieval scenarios using NestJS
Kacper Stępień, Maria Skublewska-Paszkowska350-356
-
Comparative analysis of cross-platform application development tools in terms of operating system integration
Rafał Milichiewicz, Marcin Badurowicz357-364
-
Comparative analysis of selected mobile applications for language learning
Jakub Furtak, Emilia Drabik365-370
Main Article Content
DOI
Authors
Abstract
The main aim of the study is to compare the performance of two API approaches, REST and GraphQL, in the context of data retrieval. Two applications with identical functionality have been developed in NestJS using a PostgreSQL database. Performance tests have been carried out using Grafana k6, simulating loads from 1,000 to 24,000 users. REST achieves better response times and throughput in simple queries from a single table. GraphQL shows better performance in scenarios involving complex queries from four related tables. In scenarios involving partial field selection, GraphQL returns significantly smaller responses – up to 94% smaller than REST. The results indicate that REST is more efficient in simple and high-load scenarios, while GraphQL performs better in complex data structures.
Keywords:
References
[1] R.T. Fielding, Architectural Styles and the Design of Network-based Software Architectures, PhD dissertation, University of California, Irvine, 2000.
[2] P. Linjanja, Scalable Application Development with NestJS. Leverage REST, GraphQL, microservices, testing, and deployment for seamless growth, Pact Publishing, 2025.
[3] M. Niswar, R. A. Safruddin, A. Bustamin, I. Aswad, Performance evaluation of microservices communication with REST, GraphQL, and gRPC, Int. J. Electron. Telecommun. 70(2) (2024) 429–436, https://doi.org/10.24425/ijet.2024.149562. DOI: https://doi.org/10.24425/ijet.2024.149562
[4] L. Kamiński, M. Kozłowski, D. Sporysz, K. Wolska, P. Zaniewski, R. Roszczyk, Comparative review of selected Internet communication protocols, Found. Comput. Decis. Sci. 48(1) (2023) 39–56, https://doi.org/10.2478/fcds-2023-0003. DOI: https://doi.org/10.2478/fcds-2023-0003
[5] A. Lawi, B. L. Panggabean, T. Yoshida, Evaluating GraphQL and REST API services performance in a massive and intensive accessible information system, Computers 10(11) (2021) 138, https://doi.org/10.3390/computers10110138. DOI: https://doi.org/10.3390/computers10110138
[6] D. A. Hartina, A. Lawi, B. L. E. Panggabean, Performance analysis of GraphQL and RESTful in SIM LP2M of the Hasanuddin University, In 2018 2nd East Indonesia Conference on Computer and Information Technology (EIConCIT) IEEE (2018) 237–240, https://doi.org/10.1109/EIConCIT.2018.8878524. DOI: https://doi.org/10.1109/EIConCIT.2018.8878524
[7] R. Ala-Laurinaho, J. Mattila, J. Autiosalo, J. Hietala, H. Laaki, K. Tammi, Comparison of REST and GraphQL Interfaces for OPC UA, Computers 11(5) (2022) 65, https://doi.org/10.3390/computers11050065. DOI: https://doi.org/10.3390/computers11050065
[8] E. Lee, K. Kwon, J. Yun, Performance Measurement of GraphQL API in Home ESS Data Server, In 2020 International Conference on Information and Communication Technology Convergence (ICTC) IEEE (2020) 1929–1931, https://doi.org/10.1109/ictc49870.2020.9289569. DOI: https://doi.org/10.1109/ICTC49870.2020.9289569
[9] P. Margański, B. Pańczyk, REST and GraphQL comparative analysis, J. Comput. Sci. Inst. 19 (2021) 89–94, https://doi.org/10.35784/jcsi.2473. DOI: https://doi.org/10.35784/jcsi.2473
[10] Y. Marchuk, I. Dyyak, I. Makar, Performance Analysis of Database Access: Comparison of Direct Connection, ORM, REST API and GraphQL Approaches, In 2023 IEEE 13th International Conference on Electronics and Information Technologies (ELIT) IEEE (2023) 174–176, https://doi.org/10.1109/ELIT61488.2023.10310748. DOI: https://doi.org/10.1109/ELIT61488.2023.10310748
[11] N. Vohra, I. B. K. Manuaba, Implementation of REST API vs GraphQL in microservice architecture, In 2022 International Conference on Information Management and Technology (ICIMTech) IEEE (2022) 45–50, https://doi.org/10.1109/ICIMTech55935.2022.9915244. DOI: https://doi.org/10.1109/ICIMTech55957.2022.9915098
[12] S. M. Ireland, A. C. R. Martin, GraphQL for the delivery of bioinformatics web APIs and application to ZincBind, Bioinform. Adv. 1(1) (2021) vbab023 https://doi.org/10.1093/bioadv/vbab023. DOI: https://doi.org/10.1093/bioadv/vbab023
[13] O. Hartig, J. Pérez, An initial analysis of Facebook's GraphQL language, Proceedings of the 11th Alberto Mendelzon International Workshop on Foundations of Data Management (AMW), CEUR Workshop Proceedings 1912 (2017) 1–10.
[14] M. Vogel, S. Weber, C. Zirpins, Experiences on migrating RESTful web services to GraphQL, In Service-Oriented Computing – ICSOC 2017 Workshops: ASOCA, ISyCC, WESOACS, and Satellite Events, Málaga, Spain, November 13–16, 2017, Revised Selected Papers, Springer, Cham (2018) 283–295, https://doi.org/10.1007/978-3-319-91764-1_23. DOI: https://doi.org/10.1007/978-3-319-91764-1_23
[15] O. Bhamare, P. Gite, A. Lohani, K. Choudhary, J. Choudhary, Design and Implementation of Online Legal Forum to Complain and Track UGC Cases using NextJs and GraphQL, In 2023 10th International Conference on Signal Processing and Integrated Networks (SPIN) IEEE (2023) 230–234, https://doi.org/10.1109/SPIN55947.2023.10074892. DOI: https://doi.org/10.1109/SPIN57001.2023.10117400
[16] G. Brito, T. Mombach, M. T. Valente, Migrating to GraphQL: A practical assessment, In 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER) IEEE (2019) 140–150, https://doi.org/10.1109/SANER.2019.8667986. DOI: https://doi.org/10.1109/SANER.2019.8667986
[17] M. Mikuła, M. Dzieńkowski, Comparison of REST and GraphQL web technology performance, J. Comput. Sci. Inst. 16 (2020) 309–316, https://doi.org/10.35784/jcsi.2077. DOI: https://doi.org/10.35784/jcsi.2077
[18] N. Braunisch, T. Reiplinger, R. Lehmann, Leveraging GraphQL for Large-Scale Queries on Digital Twins in Industry 4.0, In 2024 IEEE International Conference on Industrial Technology (ICIT) IEEE (2024) 1–6, https://doi.org/10.1109/ICIT58233.2024.10541016. DOI: https://doi.org/10.1109/ICIT58233.2024.10541016
[19] I. Koren, N. Jansen, J. Michael, B. Rumpe, E. Böse, A Low-Code Approach for Data View Extraction from Engineering Models with GraphQL, In 2023 ACM/IEEE International Conference on Model Driven Engineering Languages and Systems Companion (MODELS-C) IEEE (2023) 888–892, https://doi.org/10.1109/MODELS-C59198.2023.00139. DOI: https://doi.org/10.1109/MODELS-C59198.2023.00139
[20] A. Quiña-Mera, P. Fernández, J. M. García, A. Ruiz-Cortés, GraphQL: A systematic mapping study, ACM Comput. Surv. 55(10) (2023) 1–35, https://doi.org/10.1145/3561818. DOI: https://doi.org/10.1145/3561818
[21] S. L. Vadlamani, B. Emdon, J. Arts, O. Baysal, Can GraphQL replace REST? A study of their efficiency and viability, In 2021 IEEE/ACM 8th International Workshop on Software Engineering Research and Industrial Practice (SER&IP) IEEE (2021) 10–17, https://doi.org/10.1109/SERIP52588.2021.00009. DOI: https://doi.org/10.1109/SER-IP52554.2021.00009
[22] A PostgreSQL port of the Northwind database, https://github.com/pthom/northwind_psql, [11.05.2025].
Article Details
Abstract views: 160

