The technology sector is reeling after an official statement was released by the UN’s International Council of Coolness last week. The statement clearly states what status-quo developers have feared for months: if you haven’t shifted from REST to GraphQL by now, you are officially recognized by the international community to hold “uncool” status. A humanitarian crisis is already unfolding as refugees of coolness are threatening to overtake borders, sparking fears of an influx of Thinkpad Laptops, IntelliJ, and other Class A uncool narcotics.
In all honesty, I’ve found that the only way to properly answer this question is to first utter “kinda,” then mull back and forth for a little while, and then finishing with a weak statement like “so pretty much, yeah.”
Let’s put it this way. When you’re first familiarizing yourself with a set of data, what do you do? Do you read extensive documentation about the SQL table you’re about to check out? Do you read the entire spec for your version PostgreSQL to see if it contains the functionality that might be missing for some reason? I’m going to guess you do neither of these- chances are you just look at the data.
Using any REST API is inherently a context-switch. No matter how many APIs you’ve worked with in the past, you’ll never be able to know a new API’s endpoints, quirks, or the awful manner in which the creator has abandoned any distinction between GET, POST, or PUT methods altogether. GraphQL is not necessarily more technologically impressive than REST, but it does provide us a syntax and workflow comparable to working directly with databases with which we’re already familiar.
Remember when us young guys justified replacing older devs when we came out of the gate with NodeJS, arguing that context-switching changes everything? GraphQL is just that: a “better” technology with less mental context-switching, which conveniently serves a double-purpose for enterprises looking to fire anybody they perceive to be dead weight over the age of 30. Good luck finding a better synopsis than that.
Prisma is a free (FREE!) service that provides with the tools to create an API client, as well as an Admin panel to manage it. Without any prior knowledge of GraphQL needed, Prisma provides us with:
#graphql #devops #nodejs #node