GraphQL is a query language and execution engine that runs on the server side. It was developed by the Facebook community. It is an open-source platform. The language can be used to query the existing database. It is not tied to any specific database. • It is an ideal platform when one has to fetch data from various data sources as it does not require multiple requests for varied databases. GraphQL has been embraced by many big players some of them are Netflix, Facebook, Uber, and Amazon. Uber has streamlined its customer assistance ticket resolution process using GraphQL. Netflix’s content engineering team has employed GraphQL for streaming the content. Coursera delivers its educational content through the app and web that leverages symbiotic association between GraphQL and REST API. REST APIs were the popular choice of software architects before GraphQL penetrated the market. REST and Graph QL can be used effectively depending on the application’s need. Even a hybrid combination of both technologies has proven to be useful.
2. REST APIs were dominant in building backend web
services. Some of the downsides of REST lead to the
birth of GraphQL.
GraphQL is a query language and execution engine that
runs on the server side. It was developed by the
Facebook community.
It is an open-source platform. The language can be
used to query the existing database. It is not tied to
any specific database.
02
GraphQL
3. ·It is an ideal platform when one has to fetch data from
various data sources as it does not require multiple
requests for varied databases.
·REST API does not allow customization in requests. We
cannot be choosy while fetching the data. This applies
an extra bandwidth payload. GraphQL on the other hand
allows us the pick the required selective data.
·GraphQL caters to the aggregation of data from a
number of UIs
·GraphQL mingles easily with the legacy application
running with REST.
03
Application Scenario
4. ·GraphQL is scalable and fast
·Does not fetch extra data
·Allows single transaction requests for multiple data
sources.
·Allows partial fetching of the data in case of failure of
one of the requests.
·It does not need the reimplementation of data fetching
or business logic.
04
A better edge over REST
5. GraphQL is an apt choice
·for small as well as big project development
·for making it fit with any existing platform like Java,
Python, Android, etc.
·for Mobile app as well as web development.
·when data is to be fetched from multiple data sources.
·when need customized selective data.
·to avoid bandwidth concerns and for faster prototype
development.
05
When to use GraphQL
6. GraphQL has been embraced by many big players some
of them are Netflix, Facebook, Uber and Amazon.
Uber has streamlined its customer assistance ticket
resolution process using GraphQL.
Netflix’s content engineering team has employed
GraphQL for streaming the content.
Coursera delivers its educational content through the
app and web that leverages symbiotic association
between GraphQL and REST API.
06
The Popular Users
7. Selective data: REST APIs do not provide selective data
fetching as that GraphQL.
Economical Bandwidth Utilization: GraphQL shows the
ability to economize bandwidth as compared to REST.
Multiple Data Sources: REST has different endpoints for
different data sources while GraphQL uses a single end
point for multiple data sources.
Large Vs Small application: REST APIs are suitable for
small as well as big applications while GraphQL adds
more complexity when used with small applications
that fetch small and the same type of data every time.
07
REST Vs GraphQL
8. REST APIs were the popular choice of software
architects before GraphQL penetrated the market.
REST and Graph QL can be used effectively depending on
the application’s need.
Even a hybrid combination of both technologies has
proven to be useful.
08
Alternatives
9. GraphQL and REST APIs show their own pros and cons.
GraphQL is good for a big application that needs
selective data to fetch. They are also suitable for
bandwidth cautious applications.
The hybrid combination of REST and GraphQL may be
beneficial in some of the cases.
09
Conclusion