Simplest GraphQL Express Server

DAY 92 👾

I’m back 💙

Today I created Simplest GraphQL Express Server.

Easiest GraphQL :art: example with Express & Fake JSON server :wink:

Configuration

(1) Start Fake JSON server in 1 Terminal Window

yarn run json:server

(2) Start Express server in another Terminal Window

yarn run dev

(3) Open http://localhost:1337/graphql & enter the following

1
2
3
4
5
6
7
{
user(id: "57") {
name,
gender,
age
}
}

Code

Till the next time 👻