@Subscription(() => NotificationType, { topics: 'ADDED_ORDER_NOTIFICATION', filter: ({ args, context, }: ResolverFilterData<INotificationPayload, AddedOrderArgs, Context>) => args.userId !== context.req.session!.user.id, }) async addedOrder( @Root() notificationPayload: INotificationPayload, @Args() {userId}: AddedOrderArgs ): Promise<NotificationType> { return { ...notificationPayload, }; }
Обсуждают сегодня