Skip to content

Commit 2f04b46

Browse files
Merge pull request #1489 from mukaschultze/5525
docs(gateways): add warning about wsresponse serialization
2 parents a36a23b + 8893f02 commit 2f04b46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/websockets/gateways.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ handleEvent(data) {
128128

129129
> info **Hint** The `WsResponse` interface is imported from `@nestjs/websockets` package.
130130
131+
> warning **Warning** You should return a class instance that implements `WsResponse` if your `data` field relies on `ClassSerializerInterceptor`, as it ignores plain JavaScript objects responses.
132+
131133
In order to listen for the incoming response(s), the client has to apply another event listener.
132134

133135
```typescript

0 commit comments

Comments
 (0)