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

Allow HTTP and WebSocket To Use The Same Path #30

Closed
rstoyanchev opened this issue Feb 2, 2021 · 0 comments
Closed

Allow HTTP and WebSocket To Use The Same Path #30

rstoyanchev opened this issue Feb 2, 2021 · 0 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@rstoyanchev
Copy link
Contributor

Currently we use a separate path property for WebSocket with a default of "/graphql/websocket" to avoid a collision with GET "/graphql" for GraphiQL. However this shouldn't be necessary. Given the WebSocket HandlerMapping is ordered ahead, we can make it skip requests that aren't a WebSocket upgrade.

@rstoyanchev rstoyanchev self-assigned this Feb 2, 2021
@rstoyanchev rstoyanchev added the type: enhancement A general enhancement label Feb 2, 2021
@bclozel bclozel added this to the 0.1.0 milestone Feb 2, 2021
bclozel added a commit that referenced this issue Feb 2, 2021
Prior to this commit, the WebSocket endpoint (MVC or WebFlux) would be
enabled by default. In the case of MVC, the presence of
`spring-websocket` and the required dependencies was an additional hint
that could enable/disable this support depending on the application.

This commit changes the websocket path configuration so that it doesn't
hold a default value anymore. Configuring this property will trigger the
WebSocket support.

Right now developers cannot configure it to be the same as the
`spring.graphql.path`, but this will be solved in #30.

This commit also revisits the configuration properties namespace for
clarity, moving the websocket bits under their own section.

Closes gh-31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants