A progressive Node.js framework for building efficient and scalable server-side applications.
Use http://localhost:3000/graphql
in the root make a .env file and add the postgreSQL database url
{
"query": "query { getAllCars { id make model year color } }"
}
{
"query": "query { getCarsByMake(make: \"Toyota\") { id make model year color } }"
}
{
"query": "{ groupCarsByMake { make items { id model year color } } }"
}
{
"query": "mutation AddCar($carInput: CarInput!) { addCar(carInput: $carInput) { id make model year color } }",
"variables": {
"carInput": {
"make": "Toyota",
"model": "Camry",
"year": 2020,
"color": "Blue"
}
}
}
{
"query": "mutation AddCars($carInputs: [CarInput!]!) { addCars(carInputs: $carInputs) { id make model year color } }",
"variables": {
"carInputs": [
{
"make": "Honda",
"model": "Civic",
"year": 2021,
"color": "Red"
},
{
"make": "Ford",
"model": "Mustang",
"year": 2019,
"color": "Yellow"
}
]
}
}
$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prodNest is MIT licensed.