Introduction To GraphQL(REST alternative)

Hi, this is my first blog of a series in which I will publish IT content every month (2020 blogs challenge)

Rebai Ahmed
Frontend Weekly
Published in
7 min readJan 28, 2020

--

I will start with a topic that I’m so excited to learn and to implement: “GraphQL”

Introduction :

Nowadays, most applications are made in a way which server-side and client-side developed separately, and they communicate via API, so when we think about API design, the first thing that probably comes to mind is the REST Architectural style which describes how data should be transferred between the client-side and the server-side.

source: https://itnext.io/javascript-fundamentals-an-introduction-to-rest-apis-7cbe8a809d3b

In 2000, when REST was developed, client applications were relatively simple. REST was a good solution for many applications that need to communicate and exchange data over the internet anywhere in the world. And it was a good alternative to the existing solution SOAP (Simple Object Access Protocol). REST gave us important concepts for API design and offered us advantages over SOAP.

REST gave us important concepts for API design and offers us advantages over SOAP

  • Stateless servers and structured access to resources
  • REST-based applications can be written using any programming language
  • Allows a greater variety of data formats
  • Provides superior performance, particularly through caching for information
Source: https://restful.io/rest-api-back-to-basics-c64f282d972

However, since that time APIs have gotten more complex and data-driven, affected by the following factors:

  • Increased mobile usage created a need for more efficient data loading.
  • A variety of different clients: REST makes it difficult to build an API that satisfies their needs, as it returns a fixed data structure.

--

--

Rebai Ahmed
Frontend Weekly

🅰️Angular lover! Join Medium with my link: https://ahmedrebai.medium.com/membership