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
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.