fix(server): gen new request id on websocket event request (#10330)

After

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/hTwOityLamd4hitrae7M/22431b9a-30e8-48a3-8db6-de377671f9b7.png)
This commit is contained in:
fengmk2
2025-02-21 02:00:58 +00:00
parent b8dcb85007
commit 0ff7c5f897

View File

@@ -112,6 +112,9 @@ export function getRequestIdFromRequest(req: Request, type: RequestType) {
export function getRequestIdFromHost(host: ArgumentsHost) {
const type = host.getType<GqlContextType>();
if (type === 'ws') {
return genRequestId(type);
}
const req = getRequestFromHost(host);
return getRequestIdFromRequest(req, type);
}