mutation createCourse(
  $title: String
  $description: String
  $thumbnailUrl: String
  $durationMinutes: Int
  $xpReward: Int
  $categoryId: UUID!
  $levelRequired: String
  $isCertification: Boolean
) @auth(level: USER) {
  course_insert(
    data: {
      title: $title
      description: $description
      thumbnailUrl: $thumbnailUrl
      durationMinutes: $durationMinutes
      xpReward: $xpReward
      categoryId: $categoryId
      levelRequired: $levelRequired
      isCertification: $isCertification
    }
  ) 
}

mutation updateCourse(
  $id: UUID!
  $title: String
  $description: String
  $thumbnailUrl: String
  $durationMinutes: Int
  $xpReward: Int
  $categoryId: UUID!
  $levelRequired: String
  $isCertification: Boolean
) @auth(level: USER) {
  course_update(
    id: $id
    data: {
      title: $title
      description: $description
      thumbnailUrl: $thumbnailUrl
      durationMinutes: $durationMinutes
      xpReward: $xpReward
      categoryId: $categoryId
      levelRequired: $levelRequired
      isCertification: $isCertification
    }
  ) 
}

mutation deleteCourse($id: UUID!) @auth(level: USER) {
  course_delete(id: $id) 
}
