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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user