46 lines
780 B
GraphQL
46 lines
780 B
GraphQL
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)
|
|
}
|