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(postgraphile): use externalUrlBase for websockets #1070

Merged

Conversation

DvdGiessen
Copy link
Contributor

https://github.com/graphile/postgraphile/blob/44c44e2196883b7d659ff796e1eac8c4557e0884/src/postgraphile/http/subscriptions.ts#L155

Subscriptions do not work correctly when mounted on a subpath. This pull request resolves this for most use cases by using the value of the existing externalUrlBase option to determine whether we should account for a specific subpath in the web socket handler.

The documentation already tells users to fill out when mounting Postgraphile at a subpath, so no additional changes are required by users wanting to take advantage of this fix.

When this option is not specified we default to a empty string which results in the same behaviour as before.

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice clean solution; it doesn’t solve the problem for auto-detection but we can leave that for another day 👍 Thanks!

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 this pull request may close these issues.

2 participants