feat: Integrate Data Connect and Implement Staff List View Directory
This commit is contained in:
45
backend/dataconnect/example/user/mutations.gql
Normal file
45
backend/dataconnect/example/user/mutations.gql
Normal file
@@ -0,0 +1,45 @@
|
||||
mutation CreateUser(
|
||||
$id: String!, # Firebase UID
|
||||
$email: String,
|
||||
$fullName: String,
|
||||
$role: UserBaseRole!,
|
||||
$userRole: String,
|
||||
$photoUrl: String
|
||||
) @auth(level: USER) {
|
||||
user_insert(
|
||||
data: {
|
||||
id: $id
|
||||
email: $email
|
||||
fullName: $fullName
|
||||
role: $role
|
||||
userRole: $userRole
|
||||
photoUrl: $photoUrl
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation UpdateUser(
|
||||
$id: String!,
|
||||
$email: String,
|
||||
$fullName: String,
|
||||
$role: UserBaseRole,
|
||||
$userRole: String,
|
||||
$photoUrl: String
|
||||
) @auth(level: USER) {
|
||||
user_update(
|
||||
id: $id,
|
||||
data: {
|
||||
email: $email
|
||||
fullName: $fullName
|
||||
role: $role
|
||||
userRole: $userRole
|
||||
photoUrl: $photoUrl
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation DeleteUser(
|
||||
$id: String!
|
||||
) @auth(level: USER) {
|
||||
user_delete(id: $id)
|
||||
}
|
||||
Reference in New Issue
Block a user