feat: Integrate Data Connect and Implement Staff List View Directory
This commit is contained in:
53
backend/dataconnect/example/course/mutations.gql
Normal file
53
backend/dataconnect/example/course/mutations.gql
Normal file
@@ -0,0 +1,53 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user