React, Node and Graphql on production

Dilip Kumar
2 min readAug 8, 2018

With my two member small team, three months back we were suppose to develop a product from scratch. This product had four parts.

  1. Buyer App
  2. Seller App
  3. Admin App
  4. API

In previous project, we struggled a lot to use Redux and Rest API, therefore for this project, I was looking for easier developer experience. I was already learning bits and pieces about Graphql, I thought to explore this for my new project.

We completed out project in two and half months and deployed on production for beta testing.

Why Graphql?

While working with REST API for 6+ years, I always struggle with following.

  1. In initial days I was writing confluence or Google document to explain about the REST API design. Latter I moved to https://swagger.io/. But I was never happy with documenting REST API. As a developer, I always believe that my code should generate a needful documents and do not wanted to write separate document to explain the REST API.
  2. While working on Single Page Application, I always had complain to following pure REST full design which leads to many network call to render one screen.
  3. Coercion (i.e. implicit data conversion) was always a problem with REST API. Most of the time input payload pass boolean or integer data as string and in the server side code had to do the explicit type conversion data sanitization.
  4. It was always additional work to write JSON schema to validate the payload against the well written schema using my favorite AJV module. While writing JSON schema, I always wish that someone take my schema and generate the needful documentations.

Fortunately GrpahQL solves these problems and bring more goodies. It makes a smoother developer experience and faster app.

--

--