Member-only story
Build a Full Stack GraphQL Application with React + Express
With React and Express

GraphQL is an alternative to REST. It’s new and obviously. have some benefits over traditional REST API. Today we will see how we can build a simple full-stack GraphQL application.
Pre-requisites
To follow along you have to have a basic understanding of how a normal HTTP server works and some knowledge about ReactJS. You don’t have to be an expert in either of these.
Building the Backend
First, we create a very basic express
application. You can see here how to create a boilerplate express application.
Step 1. Install Dependencies
Then inside the project's root directory, we need to install these additional dependencies for graphql.
yarn add express-graphql graphql
Step 2. Create Schema
Inside the project create a file named schema.js
and create a schema for our Book. GraphQL needs to know about the underlying data structure.
For example, you must have some kind of backend in your application (Like MongoDB or Postgres) and for that, you must have some kind of data structure to talk with the database…