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

View File

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

View File

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