Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus with sub websocket #450

Open
Irupt opened this issue Jan 14, 2025 · 1 comment · May be fixed by dotansimha/graphql-yoga#3651
Open

Prometheus with sub websocket #450

Irupt opened this issue Jan 14, 2025 · 1 comment · May be fixed by dotansimha/graphql-yoga#3651
Assignees

Comments

@Irupt
Copy link

Irupt commented Jan 14, 2025

Hello, when I activate the subscription with WebSocket, the Prometheus plugin crashes. I get this error message :

Internal error occurred during message handling. Please check your implementation. TypeError: Cannot read properties of undefined (reading 'operationName') 2025-01-14 15:40:15 at /usr/app/node_modules/@graphql-yoga/plugin-prometheus/cjs/index.js:82:98 2025-01-14 15:40:15 at /usr/app/node_modules/@envelop/core/cjs/orchestrator.js:114:17 2025-01-14 15:40:15 at onSubscribe (/usr/app/dist/apps/gateway/main.js:411:31) 2025-01-14 15:40:15 at processTicksAndRejections (node:internal/process/task_queues:95:5) 2025-01-14 15:40:15 at onMessage (/usr/app/node_modules/graphql-ws/lib/server.js:149:59) 2025-01-14 15:40:15 at WebSocket.<anonymous> (/usr/app/node_modules/graphql-ws/lib/use/ws.js:83:21)

By looking at the code, I found that context.params could be undefined during subscription operations.

@Irupt
Copy link
Author

Irupt commented Jan 14, 2025

Same probleme here: dotansimha/graphql-yoga#3374

@ardatan ardatan self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants