-
Notifications
You must be signed in to change notification settings - Fork 528
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
Add trailing slash to the graphql URLs #3389
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Do we want to update the links in the documentation?
BTW, the curl
example doesn't work on macOS+zsh without quotes
curl --globoff "http://localhost:8000/graphql?query={projects{name}}"
- As I mentioned in the other PR, this works in the browser on DEV where the URL is redirected (e.g.
graphql?query={projects{name}}
⇾graphql/#query=%7B%0A%20%20projects%20%7B%0A%20%20%20%20name%0A%20%20%7D%0A%7D
.
But it doesn't work when I try with curl (even on DEV, no need to switch to PROD): I get an empty answer, while if I manually add the /
I get an answer.
$ curl --globoff -w "\nStatus code: %{http_code} \n" "http://localhost:8000/graphql?query={projects{name}}"
Status code: 301
$ curl --globoff -w "\nStatus code: %{http_code} \n" "http://localhost:8000/graphql/?query={projects{name}}"
{"data":{"projects":[{"name":"Terminology"}]}}
Status code: 200
…pport curl requests
Co-authored-by: Francesco Lodolo <flod@lodolo.net>
Explicitly added support for the URLs with trailing slashes. I've updated the docs, to make the URLs consistent with the TM and Terminology download URLs. |
I couldn't reproduce that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍🏼
Can we quote the curl addresses with {}
though? This works in both bash and zsh
Co-authored-by: Francesco Lodolo <flod@lodolo.net>
Co-authored-by: Francesco Lodolo <flod@lodolo.net>
Both of these URLs for:
https://mozilla-pontoon-staging.herokuapp.com/graphql?query=%7Bprojects%7Bname,missingStrings,approvedStrings%7D%7D
https://mozilla-pontoon-staging.herokuapp.com/graphql/?query=%7Bprojects%7Bname,missingStrings,approvedStrings%7D%7D