Introduction
In this article, we will be build a react app that will be consuming data from GraphQL as opposed to the older RESTful API
We will be doing it with a cool react boilerplate, Rekit.
Why GraphQL?
GraphQL is a query language for APIs that offers the advantages of being self-documenting where you choose to request only what you need as opposed to Restful API which can great very robust. GraphQL makes it easier to evolve APIs over time, and enables powerful developer tools.
Pre-requisites
Creating The React Client
I will also be making sure of a popular graphql boilerplate, ensure you git installed
- git clone https://github.com/graphql-boilerplates/react-fullstack-graphql
- Create an app
- Run It!
$ npm install -g rekit
$ rekit create my-app
$ cd my-app
$ npm install
$ npm start
Deploying The GraphQL Server
In case you have not already installed the Rekit Boilerplate
- Install Rekit
- Create an app
- Run It!
$ npm install -g rekit
$ rekit create my-app
$ cd my-app
$ npm install
$ npm start
Top comments (0)