@@ -42,6 +42,7 @@ export const ProfileInput = inputObjectType({
4242 t . string ( 'lastName' , { description : "The User Profile's Last Name" } ) ;
4343 t . string ( 'nickname' , { description : "The User Profile's Nickname" } ) ;
4444 t . string ( 'bio' , { description : 'A 250 character description of the User' } ) ;
45+ t . string ( 'avatarId' , { description : 'The ID of the User Profile Avatar' } ) ;
4546 } ,
4647} ) ;
4748
@@ -84,7 +85,7 @@ export const ProfileMutation = extendType({
8485 args : { input : ProfileInput } ,
8586 async resolve ( _parent , args , { prisma, token } ) {
8687 const authId = token ?. sub ;
87- const { id, firstName, lastName, nickname, bio } = args . input || { } ;
88+ const { id, firstName, lastName, nickname, bio, avatarId } = args . input || { } ;
8889
8990 const where : ProfileWhere = { } ;
9091
@@ -102,7 +103,7 @@ export const ProfileMutation = extendType({
102103 throw new UserInputError ( 'profile not found' ) ;
103104 }
104105
105- const data = { firstName, lastName, nickname, bio } ;
106+ const data = { firstName, lastName, nickname, bio, avatarId } ;
106107
107108 const result = await prisma . profile . update ( {
108109 where,
0 commit comments