Important Notice: The Base Code for the Server is a modified and edited version of the GraphQL Tutorial found here: https://www.youtube.com/playlist?list=PL4cUxeGkcC9iK6Qhn-QLcXCXPQUov1U7f
HOW TO TEST (In Windows)
Requirements
Having Downloaded Node.js (in order to use npm)
Follow Steps
-
clone the repository to a desired location of your PC, using the command in CMD: git clone repository_url (the repository url can be obtained from GitHub online clicking on the green Code Button)
-
After cloning is completed, open the cmd again and move to the repository directory that has been created. (cd GraphQL-Server)
-
Then, move to 'server' directory (cd server)
-
In this directory, run the commands one by one:
i. npm install express
ii. npm install -g nodemon
iii.npm install lodash
iv. npm install mongoose
-
that's all. to RUN THE SERVER, just run nodemon app and it should be doing good. (keep cmd open)
-
open a browser and on the top searchbar type : http://localhost:4000/graphql
-
To test the GraphQL server, try writing to the editor:
{ books{ name id author{ name } } }
or try some of the Queries from Queries.txt