feat: Integrate Data Connect and Implement Staff List View Directory
This commit is contained in:
29
backend/dataconnect/example/roleCategory/mutations.gql
Normal file
29
backend/dataconnect/example/roleCategory/mutations.gql
Normal file
@@ -0,0 +1,29 @@
|
||||
mutation createRoleCategory(
|
||||
$roleName: String!,
|
||||
$category: RoleCategoryType!
|
||||
) @auth(level: USER) {
|
||||
roleCategory_insert(
|
||||
data: {
|
||||
roleName: $roleName,
|
||||
category: $category
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation updateRoleCategory(
|
||||
$id: UUID!,
|
||||
$roleName: String,
|
||||
$category: RoleCategoryType
|
||||
) @auth(level: USER) {
|
||||
roleCategory_update(
|
||||
id: $id,
|
||||
data: {
|
||||
roleName: $roleName,
|
||||
category: $category
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation deleteRoleCategory($id: UUID!) @auth(level: USER) {
|
||||
roleCategory_delete(id: $id)
|
||||
}
|
||||
27
backend/dataconnect/example/roleCategory/queries.gql
Normal file
27
backend/dataconnect/example/roleCategory/queries.gql
Normal file
@@ -0,0 +1,27 @@
|
||||
query listRoleCategories @auth(level: USER) {
|
||||
roleCategories {
|
||||
id
|
||||
roleName
|
||||
category
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
|
||||
query getRoleCategoryById($id: UUID!) @auth(level: USER) {
|
||||
roleCategory(id: $id) {
|
||||
id
|
||||
roleName
|
||||
category
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
|
||||
query getRoleCategoriesByCategory($category: RoleCategoryType!) @auth(level: USER) {
|
||||
roleCategories(where: { category: { eq: $category } }) {
|
||||
id
|
||||
roleName
|
||||
category
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user