On GraphQL and Building an Application Using React Apollo

When I visualize building an application, I would think of using React and Redux on the front-end which talks to a set of RESTful services built with Node and Hapi (or Express). However, over a period of time, I’ve realized that this approach does not scale well when you add new features to the front-end. For example, consider a page that displays user information along with courses that a user has enrolled in. At a later point, you decide to add a section that displays popular book titles that one can view and purchase. If every entity is considered as a microservice, then to get data from three different microservices would require three HTTP requests to be sent by the front-end app. The performance of the app would degrade with the increase in the number of HTTP requests.
I read about GraphQL and knew that it was an ideal way of building an app and I need not look for anything else. The GraphQL layer can be viewed as a façade which sits on top of your RESTful services or a layer which can be used to talk directly to the persistent layer. This layer provides an interface which allows its clients (front-end apps) to query the required fields from various entities in one single HTTP request.

Link: https://dzone.com/articles/on-graphql-and-building-an-application-using-react?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev