We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Library Version 7.0.0-alpha.5
Describe the bug GraphiQL subscriptions URL is relative, when absolute is expected.
Trace: https://github.com/graphql/graphiql/blob/main/packages/graphiql-toolkit/src/create-fetcher/createFetcher.ts#L56 https://github.com/graphql/graphiql/blob/main/packages/graphiql-toolkit/src/create-fetcher/lib.ts#L82 https://github.com/enisdenjo/graphql-ws/blob/master/src/client.ts#L519 whatwg/websockets#20
To Reproduce https://github.com/ExpediaGroup/graphql-kotlin/blob/master/servers/graphql-kotlin-server/src/main/resources/graphql-graphiql.html#L48
Expected behavior Use current window.location.href to construct absolute url by default.
window.location.href
Working solution
const subscriptionUrl = new URL("/${subscriptionsEndpoint}", location.href); subscriptionUrl.protocol = location.protocol === "https:" ? "wss" : "ws";
The text was updated successfully, but these errors were encountered:
Hello 👋🏼, feel free to open a PR, should be a pretty straightforward change.
Sorry, something went wrong.
fix(server): Absolute urls for graphiql subscriptions
b8b3afa
Resolve absolute url for graphiql subscriptions using window.location.href. Fixes issue ExpediaGroup#1754.
fix(server): Absolute urls for graphiql subscriptions (#1755)
8f32dca
Resolve absolute url for graphiql subscriptions using window.location.href. Fixes issue #1754.
No branches or pull requests
Library Version
7.0.0-alpha.5
Describe the bug
GraphiQL subscriptions URL is relative, when absolute is expected.
Trace:
https://github.com/graphql/graphiql/blob/main/packages/graphiql-toolkit/src/create-fetcher/createFetcher.ts#L56
https://github.com/graphql/graphiql/blob/main/packages/graphiql-toolkit/src/create-fetcher/lib.ts#L82
https://github.com/enisdenjo/graphql-ws/blob/master/src/client.ts#L519
whatwg/websockets#20
To Reproduce
https://github.com/ExpediaGroup/graphql-kotlin/blob/master/servers/graphql-kotlin-server/src/main/resources/graphql-graphiql.html#L48
Expected behavior
Use current
window.location.href
to construct absolute url by default.Working solution
The text was updated successfully, but these errors were encountered: