mutation CreateAssignment(
  $assignmentNumber: String,
  $orderId: UUID!,
  $workforceId: UUID!,
  $vendorId: UUID!,
  $role: String!,
  $assignmentStatus: AssignmentStatus!,
  $scheduledStart: Timestamp!
) @auth(level: USER) {
  assignment_insert(
    data: {
      assignmentNumber: $assignmentNumber
      orderId: $orderId
      workforceId: $workforceId
      vendorId: $vendorId
      role: $role
      assignmentStatus: $assignmentStatus
      scheduledStart: $scheduledStart
    }
  )
}

mutation UpdateAssignment(
  $id: UUID!,
  $assignmentNumber: String,
  $orderId: UUID,
  $workforceId: UUID,
  $vendorId: UUID,
  $role: String,
  $assignmentStatus: AssignmentStatus,
  $scheduledStart: Timestamp
) @auth(level: USER) {
  assignment_update(
    id: $id,
    data: {
      assignmentNumber: $assignmentNumber
      orderId: $orderId
      workforceId: $workforceId
      vendorId: $vendorId
      role: $role
      assignmentStatus: $assignmentStatus
      scheduledStart: $scheduledStart
    }
  )
}

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