feat: user session resolver added for sessions updates
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
import { ObjectType, ID, Field, InputType } from '@nestjs/graphql';
|
||||
import {
|
||||
ObjectType,
|
||||
ID,
|
||||
Field,
|
||||
InputType,
|
||||
registerEnumType,
|
||||
} from '@nestjs/graphql';
|
||||
|
||||
@ObjectType()
|
||||
export class User {
|
||||
@@ -38,33 +44,11 @@ export class User {
|
||||
currentGQLSession?: string;
|
||||
}
|
||||
|
||||
@InputType()
|
||||
export class UpdateUserInput {
|
||||
@Field({
|
||||
nullable: true,
|
||||
name: 'displayName',
|
||||
description: 'Displayed name of the user (if given)',
|
||||
})
|
||||
displayName?: string;
|
||||
|
||||
@Field({
|
||||
nullable: true,
|
||||
name: 'photoURL',
|
||||
description: 'URL to the profile photo of the user (if given)',
|
||||
})
|
||||
photoURL?: string;
|
||||
|
||||
@Field({
|
||||
nullable: true,
|
||||
name: 'currentRESTSession',
|
||||
description: 'JSON string of the saved REST session',
|
||||
})
|
||||
currentRESTSession?: string;
|
||||
|
||||
@Field({
|
||||
nullable: true,
|
||||
name: 'currentGQLSession',
|
||||
description: 'JSON string of the saved GQL session',
|
||||
})
|
||||
currentGQLSession?: string;
|
||||
export enum SessionType {
|
||||
REST = 'REST',
|
||||
GQL = 'GQL',
|
||||
}
|
||||
|
||||
registerEnumType(SessionType, {
|
||||
name: 'SessionType',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user