Skip to content

indahud/nodejs-graphql-mongodb-starter

Repository files navigation

Express, MongoDB, Apollo GraphQL CRUD application

getAllCars

query getCars {
  getAllCars {
    id
    model
    year
    company
  }
}

getAllCars

getCar

query getCar {
  getCar(id: "619779698be6e0dbf0e96369") {
    id
    model
    year
    company
  }
}

addCar

Add Car

mutation adddCar {
  addCar(model: "Corvette Stingray",  year:  2022,  company:  "Chevrolet"){
    id
    model
    year
    company
  }
}

addCar

Delete Car

mutation removeCar {
  removeCar(id: "619781fac105b71736f22450"){
    id
    model
    year
    company
  }
}

removeCar

update Car

mutation updateCar {
  updateCar(id: "619779698be6e0dbf0e96369",  model: "Mustang", year: 2020, company: "Ford") {
    id
    model
    year
    company
  }
} 

updateCar

Releases

No releases published

Packages

No packages published