mutation CreateAssignment(
  $workforceId: UUID!
  $title: String
  $description: String
  $instructions: String
  $status: AssignmentStatus
  $tipsAvailable: Boolean
  $travelTime: Boolean
  $mealProvided: Boolean
  $parkingAvailable: Boolean
  $gasCompensation: Boolean
  $managers: [Any!]
  $roleId: UUID!
  $shiftId: UUID!
) @auth(level: USER) {
  assignment_insert(
    data: {
      workforceId: $workforceId
      title: $title
      description: $description
      instructions: $instructions
      status: $status
      tipsAvailable: $tipsAvailable
      travelTime: $travelTime
      mealProvided: $mealProvided
      parkingAvailable: $parkingAvailable
      gasCompensation: $gasCompensation
      managers: $managers
      roleId: $roleId
      shiftId: $shiftId
    }
  )
}

mutation UpdateAssignment(
  $id: UUID!
  $title: String
  $description: String
  $instructions: String
  $status: AssignmentStatus
  $tipsAvailable: Boolean
  $travelTime: Boolean
  $mealProvided: Boolean
  $parkingAvailable: Boolean
  $gasCompensation: Boolean
  $managers: [Any!]
  $roleId: UUID!
  $shiftId: UUID!
) @auth(level: USER) {
  assignment_update(
    id: $id
    data: {
      title: $title
      description: $description
      instructions: $instructions
      status: $status
      tipsAvailable: $tipsAvailable
      travelTime: $travelTime
      mealProvided: $mealProvided
      parkingAvailable: $parkingAvailable
      gasCompensation: $gasCompensation
      managers: $managers
      roleId: $roleId
      shiftId: $shiftId
    }
  )
}

mutation DeleteAssignment($id: UUID!) @auth(level: USER) {
  assignment_delete(id: $id)
}
