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

fix: Restrict subscriptions WS server to add listeners only to its own path #2314

Merged
merged 1 commit into from Sep 1, 2022

Conversation

GValeriy
Copy link

@GValeriy GValeriy commented Jul 25, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A
We have a shared Nest server, which serves both Next.js and nestjs/graphQL.
GraphQL WS server conflicts and aborts requests to Next.js, sending to path - "/_next/webpack-hmr".

Next version is 12.2.3.

Nextjs WS server looks like has such path check on its side -
https://github.com/vercel/next.js/blob/0f99768f9811fdf027a083471bd2a435f6207f4a/packages/next/server/dev/next-dev-server.ts#L638-L645

What is the new behavior?

The "nestjs/graphql" package will upgrade listeners only for its path and won't conflict.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@GValeriy GValeriy changed the title fix: Retrict subscriptions WS server to add listeners only to its own path fix: Restrict subscriptions WS server to add listeners only to its own path Jul 25, 2022
@kamilmysliwiec kamilmysliwiec merged commit 593a0d1 into nestjs:master Sep 1, 2022
@kamilmysliwiec
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants