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

[dagit] redirect trailing slash on GraphQL route #13181

Closed
wants to merge 1 commit into from

Conversation

benpankow
Copy link
Member

Summary

Adds a redirect from the graphql URL with a trailing slash: localhost:3000/graphql/->localhost:3000/graphql. A user recently ran into this: https://elementl-workspace.slack.com/archives/C046ZK3KQ5D/p1679944131264839?thread_ts=1679942695.590929&cid=C046ZK3KQ5D

@benpankow benpankow requested a review from alangenfeld March 27, 2023 19:36
@benpankow
Copy link
Member Author

benpankow commented Mar 27, 2023

This stack of pull requests is managed by Graphite. Learn more about stacking.

@benpankow benpankow requested review from dpeng817 and hellendag March 27, 2023 19:36
@brad-alexander
Copy link
Contributor

A compelling reason to omit the redirect (or make it optional) would be to prevent accidental performance issues. It looks like even if you use sessions in requests, it does not remember 307 or even 308 responses, and will always make two roundtrips for every request. This probably wouldn't be much of a hit if the server is on the same network, but if the server is under significant load, or over slow WAN/VPN it could be significant overhead - especially if it is a large POST request.

@alangenfeld
Copy link
Member

should we take an approach similar to what we did here and just dupe the routes instead
https://github.com/dagster-io/internal/pull/876/files

Copy link
Member

@alangenfeld alangenfeld left a comment

Choose a reason for hiding this comment

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

to your queue

@alangenfeld
Copy link
Member

related encode/starlette#869 though that doesn't necessarily help much

@benpankow benpankow closed this Dec 10, 2024
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.

3 participants