Skip to content

Commit

Permalink
update chatStream
Browse files Browse the repository at this point in the history
  • Loading branch information
ZHallen122 committed Oct 29, 2024
1 parent 74ff944 commit 1573d72
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/src/chat/chat.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import {
ChatInput,
} from 'src/chat/dto/chat.input';
import { UseGuards } from '@nestjs/common';
import { ChatGuard, MessageGuard } from '../guard/chat.guard';
import {
ChatGuard,
ChatSubscriptionGuard,
MessageGuard,
} from '../guard/chat.guard';
import { GetUserIdFromToken } from '../decorator/get-auth-token';

@Resolver('Chat')
Expand All @@ -21,6 +25,8 @@ export class ChatResolver {
private userService: UserService,
) {}

// this guard is not easy to test in /graphql
// @UseGuards(ChatSubscriptionGuard)
@Subscription(() => ChatCompletionChunk, {
nullable: true,
resolve: (value) => value,
Expand Down

0 comments on commit 1573d72

Please sign in to comment.