Basic Functionalities of GraphQL every Developer Should Know

Why did facebook come up with it? How does it avoid over-fetching/under-fetching?

Anurag Sidana
Javarevisited

--

Photo by graphql.org

What is it?

GraphQL is a query language to retrieve data from the server. It can be taken as an alternative to REST, SOAP, or gRPC in some way.
Built for Facebook’s internal use and later made open source.
Today it powers hundreds of billions of API calls a day for Facebook and being used extensively by many others.

Why name, GraphQL?

So as we know GraphQL is not a query language for graph databases but it is still an appropriate name because it queries the graph of your application data.

Why did Facebook come with GraphQL?

Facebook’s developers were frustrated with the differences between the data they wanted to use in their apps and the server queries they required.

They didn’t think of data in terms of resource URLs, secondary keys, or join tables; they thought about it in terms of a graph of objects and the models they ultimately use in their apps like NSObjects or JSON.

--

--

Anurag Sidana
Javarevisited

Specialized expertise in agile and structured test-driven software development using Java. Living a life based out of open-closed principal. ;-)