diff --git a/packages/hoppscotch-backend/prisma/schema.prisma b/packages/hoppscotch-backend/prisma/schema.prisma index 947d158a8..7d88dbcf2 100644 --- a/packages/hoppscotch-backend/prisma/schema.prisma +++ b/packages/hoppscotch-backend/prisma/schema.prisma @@ -79,10 +79,12 @@ model TeamEnvironment { } model User { - uid String @id @default(cuid()) - displayName String? - email String? - photoURL String? + uid String @id @default(cuid()) + displayName String? + email String? + photoURL String? + currentRESTSession String? + currentGQLSession String? } enum TeamMemberRole { diff --git a/packages/hoppscotch-backend/src/user/user.model.ts b/packages/hoppscotch-backend/src/user/user.model.ts index 779dbc4db..e2f2eb4a4 100644 --- a/packages/hoppscotch-backend/src/user/user.model.ts +++ b/packages/hoppscotch-backend/src/user/user.model.ts @@ -24,4 +24,16 @@ export class User { description: 'URL to the profile photo of the user (if given)', }) photoURL?: string; + + @Field({ + nullable: true, + description: 'JSON string of current REST session for logged-in User', + }) + currentRESTSession?: string; + + @Field({ + nullable: true, + description: 'JSON string of current GraphQL session for logged-in User', + }) + currentGQLSession?: string; }