Files
Krow-workspace/backend/dataconnect/connector/role/mutations.gql
2026-01-19 19:18:11 -05:00

37 lines
624 B
GraphQL

mutation createRole(
$name: String!
$costPerHour: Float!
$vendorId: UUID!
$roleCategoryId: UUID!
) @auth(level: USER) {
role_insert(
data: {
name: $name
costPerHour: $costPerHour
vendorId: $vendorId
roleCategoryId: $roleCategoryId
}
)
}
mutation updateRole(
$id: UUID!
$name: String
$costPerHour: Float
$roleCategoryId: UUID!
) @auth(level: USER) {
role_update(
id: $id
data: {
name: $name
costPerHour: $costPerHour
roleCategoryId: $roleCategoryId
}
)
}
mutation deleteRole($id: UUID!) @auth(level: USER) {
role_delete(id: $id)
}