query listCourses @auth(level: USER) {
  courses {
    id
    title
    description
    thumbnailUrl
    durationMinutes
    xpReward
    categoryId
    levelRequired
    isCertification
    createdAt

      category{
        id
        label
      }

  }
}

query getCourseById($id: UUID!) @auth(level: USER) {
  course(id: $id) {
    id
    title
    description
    thumbnailUrl
    durationMinutes
    xpReward
    categoryId
    levelRequired
    isCertification
    createdAt

      category{
        id
        label
      }

  }
}

query filterCourses(
  $categoryId: UUID
  $isCertification: Boolean
  $levelRequired: String
  $completed: Boolean
) @auth(level: USER) {
  courses(
    where: {
      categoryId: { eq: $categoryId }
      isCertification: { eq: $isCertification }
      levelRequired: { eq: $levelRequired }
    }
  ) {
    id
    title
    categoryId
    levelRequired
    isCertification

      category{
        id
        label
      }

  }
}
