refactor: modifed return types of mutation/subscriptions in UserCollections (#57)

* refactor: modifed userCollectionRemoved subscription to return custom return type

* chore: created new return type for export to JSON mutation in UserCollection

* refactor: added reqType to exportUserCollectionsToJSON query

* chore: remove duplicate enum in user-collection.model.ts file
This commit is contained in:
Balu Babu
2023-03-29 15:50:48 +05:30
committed by GitHub
parent b6950332ad
commit ea93162056
4 changed files with 63 additions and 10 deletions

View File

@@ -38,6 +38,32 @@ export class UserCollectionReorderData {
nextUserCollection?: UserCollection;
}
@ObjectType()
export class UserCollectionRemovedData {
@Field(() => ID, {
description: 'ID of User Collection being removed',
})
id: string;
@Field(() => ReqType, {
description: 'Type of the user collection',
})
type: ReqType;
}
registerEnumType(ReqType, {
name: 'CollType',
});
@ObjectType()
export class UserCollectionExportJSONData {
@Field(() => ID, {
description: 'Stringified contents of the collection',
})
exportedCollection: string;
@Field(() => ReqType, {
description: 'Type of the user collection',
})
collectionType: ReqType;
}