Page 101 - ASBIRES-2017_Preceedings
P. 101
th
Proceedings of the 9 Symposium on Applied Science, Business & Industrial Research – 2017
ISSN 2279-1558, ISBN 978-955-7442-09-9
GraphQL Query Saver: Enhancing the Performance of GraphQL API with a
Query Saving Facility
Madusanka ADC, Nagahamulla HRK
Department of Computing and Information System, Wayamba University of Sri Lanka
adc.madusanka@gmail.com
ABSTRACT
GraphQL is the layer (system) that both client side (the front end) and server side (the
back end) developers use to communicate. Client side developers test queries and
mutations through GraphQL and server side developers add queries and mutations to
GraphQL. Therefore, Client side developers can check queries and mutations before
developing User Interface (UI) and connect to server. The main drawback in this system is
that developers must always type queries and if errors occur they must share error queries
or mutations via a different system. During the testing period the developers must enter a
lot of queries. Many of these queries can be reused, but since there is no way of saving and
reusing the previous queries the developers must always type the necessary queries. As a
result, time wastage is very high. To overcome this GraphQL Query Saver system is
introduced to provide facilities to save the queries and reuse them whenever necessary.
KEYWORDS: GraphQL, Nginx, Query, Query save
1 INTRODUCTION query, therefor, user have to type queries
again and again. Also, when novice
GraphQL is a query language that is developers join the firm they may not have
built by Facebook. This can provide knowledge about GraphQL and how to work
common interface between client side and with current developing project and access
server side for get data (query) and insert, data. Therefore, until he/she learns these
update, delete data (mutations). Client side details he/she cannot become a productive
can request number of data from GraphQL member for the company. To overcome
using queries. The reply format is also stated these problems, we propose an add-in to the
in the query as described by client. These system that is able to save queries typed by
kinds of query are called client specified the developers so that they can be reused
queries. GraphQL isn’t language specific; it later. The proposed system will act as a
is specific between client and server. If modification for the existing system.
client side can communicate with server
side, then GraphQL can be used. Main Using the saving facility, the users will
concepts of the GraphQL are strong-typing, be able to save the queries/mutations so that
unordered, client specific queries. In this they do not need to type and retype the
interface, Jason format is used to insert data queries they have used before, and can
to server and retrieve data from the server. simply reload the saved queries/mutations
GraphQL help developers to get flexible when necessary.
response according to developer needs and Also, the saved queries/mutations can be
reduce a lot of extra queries and thus reduce shared easily among the developers. New
lot of unnecessary data transmission.
trainee or intern will be able to easily use the
1.1 Introduction to the Research Project saved queries and learn about the system.
The main objective of this research project
Lots of software development
companies use GraphQL because of many is to save time by avoiding unnecessary
advantages. However, GraphQL system retyping of queries/mutations. In IT industry
does not have facilities to save the typed time is a very valuable constraint.
91