This is a boilerplate for a graphql server built with graphql, express.js, mongoose, typescript and es6
- Install all the dependencies
yarn
ornpm i
- Rename
.env.sample
to.env
and update the variables accordingly - Start your mongo server by running
mongod
in your terminal - Start the server by running
yarn dev
- Visit http://localhost:{PORT_NUMBER}/graphql and execute the query below:
{
sayHi
}
The server will return:
{
"data": {
"sayHi": "Hello world"
}
}