adding new filed to user

This commit is contained in:
José Salazar
2025-12-26 15:18:56 -05:00
parent 5136b1d6b5
commit 9acd01237e
3 changed files with 11 additions and 3 deletions

View File

@@ -3,7 +3,8 @@ mutation CreateUser(
$email: String!,
$fullName: String!,
$role: UserBaseRole!,
$userRole: String
$userRole: String,
$photoUrl: String
) @auth(level: USER) {
user_insert(
data: {
@@ -12,6 +13,7 @@ mutation CreateUser(
fullName: $fullName
role: $role
userRole: $userRole
photoUrl: $photoUrl
}
)
}
@@ -21,7 +23,8 @@ mutation UpdateUser(
$email: String,
$fullName: String,
$role: UserBaseRole,
$userRole: String
$userRole: String,
$photoUrl: String
) @auth(level: USER) {
user_update(
id: $id,
@@ -30,6 +33,7 @@ mutation UpdateUser(
fullName: $fullName
role: $role
userRole: $userRole
photoUrl: $photoUrl
}
)
}

View File

@@ -5,6 +5,7 @@ query listUsers @auth(level: USER) {
fullName
role
userRole
photoUrl
createdDate
updatedDate
}
@@ -19,6 +20,7 @@ query getUserById(
fullName
role
userRole
photoUrl
}
}
@@ -41,5 +43,6 @@ query filterUsers(
fullName
role
userRole
photoUrl
}
}

View File

@@ -8,7 +8,8 @@ type User @table(name: "users") {
email: String!
fullName: String!
role: UserBaseRole!
userRole: String
userRole: String
photoUrl: String
createdDate: Timestamp @default(expr: "request.time")
updatedDate: Timestamp @default(expr: "request.time")
createdBy: String @default(expr: "auth.uid")