diff --git a/packages/server/modules/notifications/graph/resolvers/userNotificationPreferences.ts b/packages/server/modules/notifications/graph/resolvers/userNotificationPreferences.ts index f4f4faee7..39f9bb59a 100644 --- a/packages/server/modules/notifications/graph/resolvers/userNotificationPreferences.ts +++ b/packages/server/modules/notifications/graph/resolvers/userNotificationPreferences.ts @@ -8,6 +8,7 @@ import { getUserNotificationPreferencesFactory, updateNotificationPreferencesFactory } from '@/modules/notifications/services/notificationPreferences' +import { withOperationLogging } from '@/observability/domain/businessLogging' const getUserNotificationPreferences = getUserNotificationPreferencesFactory({ getSavedUserNotificationPreferences: getSavedUserNotificationPreferencesFactory({ @@ -28,7 +29,15 @@ export = { }, Mutation: { async userNotificationPreferencesUpdate(_parent, args, context) { - await updateNotificationPreferences(context.userId!, args.preferences) + const logger = context.log + await await withOperationLogging( + async () => updateNotificationPreferences(context.userId!, args.preferences), + { + logger, + operationName: 'userNotificationPreferencesUpdate', + operationDescription: 'Update user notification preferences' + } + ) return true } }