CFP last date
20 May 2024
Reseach Article

Enhancement of GraphQL Data Fetching Technique

by Chaitanya A., Hariharan R., Harishkumaar S., Prabavathy B.
International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
Volume 184 - Number 20
Year of Publication: 2022
Authors: Chaitanya A., Hariharan R., Harishkumaar S., Prabavathy B.
10.5120/ijca2022922228

Chaitanya A., Hariharan R., Harishkumaar S., Prabavathy B. . Enhancement of GraphQL Data Fetching Technique. International Journal of Computer Applications. 184, 20 ( Jul 2022), 1-6. DOI=10.5120/ijca2022922228

@article{ 10.5120/ijca2022922228,
author = { Chaitanya A., Hariharan R., Harishkumaar S., Prabavathy B. },
title = { Enhancement of GraphQL Data Fetching Technique },
journal = { International Journal of Computer Applications },
issue_date = { Jul 2022 },
volume = { 184 },
number = { 20 },
month = { Jul },
year = { 2022 },
issn = { 0975-8887 },
pages = { 1-6 },
numpages = {9},
url = { https://ijcaonline.org/archives/volume184/number20/32430-2022922228/ },
doi = { 10.5120/ijca2022922228 },
publisher = {Foundation of Computer Science (FCS), NY, USA},
address = {New York, USA}
}
%0 Journal Article
%1 2024-02-07T01:21:55.329759+05:30
%A Chaitanya A.
%A Hariharan R.
%A Harishkumaar S.
%A Prabavathy B.
%T Enhancement of GraphQL Data Fetching Technique
%J International Journal of Computer Applications
%@ 0975-8887
%V 184
%N 20
%P 1-6
%D 2022
%I Foundation of Computer Science (FCS), NY, USA
Abstract

Data fetching techniques are used to communicate between servers and clients on the World Wide Web. It serves as the basis of modern data-driven websites, since these websites have more frequent communication between client and server. In addition, it will have a huge data transfer between them. The predominant data fetching techniques are REST API, GraphQL and Protobuf. REST API is the most popular data fetching technique in the market, but it does not provide a way to get only the fields required by the client. GraphQL addresses this problem by providing dynamic querying. However, both the REST API and GraphQL return the response in JSON format, which has keys and values. These keys in the response can occupy a huge chunk of the response as the size of the response increases. This is a drawback for data-driven applications that run on bandwidth-constrained devices. Protobuf tries to address this problem by returning the response as an array of values, but Protobuf does not allow the client to query only the required fields. Hence, the objective of this paper is to propose a new data fetching technique that combines the advantages of GraphQL and Protobuf to reduce the payload size and the response time.

References
  1. Andersson, T., Reinholdsson, H., (2021). “REST API vs GraphQL - A literature and experimental study”, Spring Semester, Kristianstad University, Sweden.
  2. Brito, G., Valente, MT., (2020). “Rest vs graphql: A controlled experiment”, In Proceedings of IEEE International Conference on Software Architecture, pp. 81-91.
  3. Google Developers, (2021), Language Guide — Protocol Buffers — Google Developers, https://developers.google.com/protocolbuffers/ docs/overview, Accessed on 02/06/2022.
  4. GraphQL Foundation, (2021), GraphQL - A Query language for your API, https://graphql.org, Accessed on 02/06/2022.
  5. How does graphQL work, anyway? - Medium article - https://medium.com/@rajeshdavid/how-does-a-graphqlservice- work-internally-496dc9264096, Accessed on 02/06/2022.
  6. IBM Education, (2021), What is a REST API?, https://www.ibm.com/in-en/cloud/learn/rest-apis, Accessed on 02/06/2022.
  7. Seabra, M., Naz´ario, MF., Pinto, G., (2019). “REST or GraphQL? A performance comparative study”, In Proceedings of the XIII Brazilian Symposium on Software Components, Architectures and Reuse, pp. 123-132.
  8. Sumaray, A., Kami Makki S., (2012). “A comparison of data serialization formats for optimal efficiency on a mobile platform”, In Proceedings of the 6th International Conference on Ubiquitous Information Management and Communication, pp. 1-6.
Index Terms

Computer Science
Information Sciences

Keywords

Payload size Response time