chore: commented out subscriptions

This commit is contained in:
ankitsridhar16
2023-02-09 16:28:16 +05:30
committed by Balu Babu
parent 63b6c76f51
commit c7829201e1

View File

@@ -164,21 +164,22 @@ export class ShortcodeResolver {
/* Subscriptions */
@Subscription(() => Shortcode, {
description: 'Listen for shortcode creation',
resolve: (value) => value,
})
@UseGuards(GqlAuthGuard)
myShortcodesCreated(@GqlUser() user: AuthUser) {
return this.pubsub.asyncIterator(`shortcode/${user.uid}/created`);
}
@Subscription(() => Shortcode, {
description: 'Listen for shortcode deletion',
resolve: (value) => value,
})
@UseGuards(GqlAuthGuard)
myShortcodesRevoked(@GqlUser() user: AuthUser): AsyncIterator<Shortcode> {
return this.pubsub.asyncIterator(`shortcode/${user.uid}/revoked`);
}
// TODO: update subscription after fixing service methods
// @Subscription(() => Shortcode, {
// description: 'Listen for shortcode creation',
// resolve: (value) => value,
// })
// @UseGuards(GqlAuthGuard)
// myShortcodesCreated(@GqlUser() user: AuthUser) {
// return this.pubsub.asyncIterator(`shortcode/${user.uid}/created`);
// }
//
// @Subscription(() => Shortcode, {
// description: 'Listen for shortcode deletion',
// resolve: (value) => value,
// })
// @UseGuards(GqlAuthGuard)
// myShortcodesRevoked(@GqlUser() user: AuthUser): AsyncIterator<Shortcode> {
// return this.pubsub.asyncIterator(`shortcode/${user.uid}/revoked`);
// }
}