DEV Community

Olulana Kolawole
Olulana Kolawole

Posted on

Build a web app with GraphQL and React

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

  • Recent versions of Node.js and npm installed on your system

  • knowledge of JavaScript/ES6

  • Intermediate Knowledge of React
  • Creating The React Client

    I will also be making sure of a popular graphql boilerplate, ensure you git installed

    1. git clone https://github.com/graphql-boilerplates/react-fullstack-graphql
    2. $ npm install -g rekit
    3. Create an app
    4. $ rekit create my-app $ cd my-app $ npm install
    5. Run It!
    6. $ npm start

    Deploying The GraphQL Server

    In case you have not already installed the Rekit Boilerplate

    1. Install Rekit
    2. $ npm install -g rekit
    3. Create an app
    4. $ rekit create my-app $ cd my-app $ npm install
    5. Run It!
    6. $ npm start

    Top comments (0)