- Clone this repository or download zip file from main/master branch
- Run npm install in project root directory
- Run npm install -g nodemon to install nodemon globally
- Copy .env.example to .env and change password to new password(provided in email)
- Run nodemon index.js to start server
- Visit http://localhost:3477/graphql to test assignment
Link -- https://nimb.ws/2LJq3X
- Get all Entries
{
populations
}
- Fetch by Country Name
{
populationByCountry(country:"Albania")
}
- Fetch by Year
{
populationByYear(year:"2021")
}
- Add new Entry
mutation{
addPopulation(country:"India", year:"2020", area_km:"1234", total_population:"4321")
}