Three reasons why GraphQL rocks

In building a tutorial for an awesome new BaaS (Backend-as-a-Service) called 8base, I’ve had to learn a thing or two about GraphQL. To get up to speed efficiently I took Adhithi Ravichandran’s course on Pluralsight called GraphQL: The Big Picture.

Adhithi’s course is well put together and delivered so succinctly and seamlessly! I really enjoyed it and as a result of consuming it, I now feel confident that I can talk intelligently about GraphQL and begin to use the technology with a good sense of the fundamentals. (I highly recommend this course!)

To summarize, what I learned in Adhithi’s course, GraphQL is a specification and language-agnostic query language for APIs. Here are the top three features and benefits of GraphQL that I took away:

  1. Efficiency: GraphQL features declarative data fetching that eliminates multiple round trips to API endpoints to fetch data (over-fetching) as occurs with REST. With GraphQL you can request and get only what you need from the backend. (No more needing to deal with filtering through those massive JSON objects!) Because of this, you no longer need to define or maintain a bunch of individual API endpoints.
  2. Predictability: With GraphQL you get a contract between the client and server with strong types, which results in more predictable code and earlier detection of errors.
  3. Friendly: GraphQL works with almost any backend DB and requires no API versioning. Due to its very nature, frontend and backend developers can work independently and in parallel with frontend folks able to work with a mock version of an API.

Essentially, GraphQL is apparently a more efficient way than REST to do APIs and there is a robust community and plenty of high-quality tooling to go along with it. Check out Adhithi’s course on Pluralsight if you want to get off and running with GraphQL quickly.

Show Comments

Get the latest posts delivered right to your inbox.