Skip to content

Latest commit

 

History

History
78 lines (62 loc) · 699 Bytes

README.md

File metadata and controls

78 lines (62 loc) · 699 Bytes

Running the project

  1. Create and start container:
task run

or

docker-compose up -d

Accessing graphql

  1. Access:
localhost:8080/graphql

Mutations Example

  1. Create Brand:
mutation createBrand {
  createBrand(input: {name: "Fiat"}) {
    name
  }
}
  1. Create Car:
mutation createCar {
  createCar(input: {name: "Punto", brandID: $brandID}) {
    name
  }
}

Query Example

  1. List all Brands:
query listBrands{
  brands {
    id
    name
  }
}
  1. List all Cars:
query listCars {
  cars {
    id
    name
    brand {
      name
      id
    }
  }
}

Stopping the project

task stop

or

docker-compose down -v