feat: user settings create subscription added and fixed typos

This commit is contained in:
Mir Arif Hasan
2023-01-24 07:26:47 +06:00
parent e40d77420c
commit bc82e9c7fa
2 changed files with 11 additions and 2 deletions

View File

@@ -58,6 +58,15 @@ export class UserSettingsResolver {
/* Subscriptions */
@Subscription(() => UserSettings, {
description: 'Listen for user setting creates',
resolve: (value) => value,
})
@UseGuards(GqlAuthGuard)
userSettingsCreated(@GqlUser() user: User) {
return this.pubsub.asyncIterator(`user_settings/${user.uid}/created`);
}
@Subscription(() => UserSettings, {
description: 'Listen for user setting updates',
resolve: (value) => value,