directive @vspec(element: VspecElement!) on OBJECT

enum VspecElement {
  STRUCT
}

enum RowEnum {
  ROW1
  ROW2
}

enum SideEnum {
  DRIVERSIDE
  PASSENGERSIDE
}

type DoorPosition @instanceTag {
  row: RowEnum!
  side: SideEnum!
}

type Door {
  isLocked: Boolean
  position: Int @range(min: 0, max: 100)
  instanceTag: DoorPosition
}

type Vehicle @vspec(element: STRUCT) {
  doors: [Door] @noDuplicates
  model: String
  year: Int
  features: [String] @noDuplicates @cardinality(min: 1, max: 10)
}

enum SeatRowEnum {
  ROW1
  ROW2
  ROW3
}

enum SeatPositionEnum {
  LEFT
  CENTER
  RIGHT
}

type SeatPosition @instanceTag {
  row: SeatRowEnum!
  position: SeatPositionEnum!
}

type Seat {
  isOccupied: Boolean
  height: Int @range(min: 0, max: 100)
  instanceTag: SeatPosition
}

type Cabin @vspec(element: STRUCT) {
  seats: [Seat] @noDuplicates
  doors: [Door] @noDuplicates
  temperature: Float @range(min: -100, max: 100)
}

extend type Query {
  vehicle: Vehicle
  cabin: Cabin
}
