GraphQL —My Thoughts

Priyanshu Saraf
Clever Programmer
Published in
3 min readNov 22, 2020

--

GraphQL is a hot and trendy topic currently, and it is growing very fast. There is a very good reason for that. I believe that GraphQL has a bright future ahead, and we will be discussing that in this article.

Prerequisites:

  • Basic JavaScript knowledge
  • Some familiarity with node JS or APIs in general

What Is GraphQL?

GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data. GraphQL isn’t tied to any specific database or storage engine and is instead backed by your existing code and data.

It is a very less used tool in your belt, but when the time comes, there is no other savior but it.

If you have dealt with Rest APIs, then I believe you know about the get, post, and delete requests. Here, GraphQL can make your life easier.

When you pass a request in a large scale application, you are serving a LOT of people, say 40 million-100 million or more. Here, just one request can become a big pain for you as this will put a lot of load on your servers. If you have a small scale, or even a relatively large scale application, which is serving say 3 million people at max, then this is not that big of a deal, but when you serve hundreds of millions of people, it becomes important for you to handle these requests efficiently. This is where GraphQL comes in.

Facebook was experiencing the problem of overloaded servers, and hence, they decided to create GraphQL, which would let them manage their requests efficiently. It helps you to take the exact piece of data that you need, and hence reduces a lot of load from the servers.

Although, even with all its benefits, GraphQL comes with its own set of cons

Cons:

  • You create a lot of mess in the backend,
  • A ton of configuration needed
  • Really not necessary for sites that are not handling a huge amount of traffic

GraphQL has a bunch of other stuff that makes it unique and powerful. In this blog, we will not be exploring a lot about it. This was centered around making you understand what graphQL exactly is.

My Thoughts

I believe that GraphQL is a very powerful, yet quite an unused tool that comes in handy only a few times. In my opinion, it is not something that I would focus on primarily if I were to become a full-stack developer. It is something that I would only have on my side, maybe spend just a bit if I need to. It is not the most important thing.

If you are an advanced developer, though, make sure to learn it. If it blows up, then you, being someone who already knows about it can charge people a lot to teach it to them, but if it does not, you learned something new. You took action, and maybe someday you might use it.

Thank you! I hope you found value in this article.

Priyanshu Saraf.

--

--

Priyanshu Saraf
Clever Programmer

Blogger, freelancer, and Tutor! Let’s connect on instagram! Here’s my handle: @saraf_priyanshu_