-
Notifications
You must be signed in to change notification settings - Fork 275
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
bug: incoming http POST queries are flagged as GET queries by the router #865
Labels
Comments
thanks for the report, this is a regression, we'll fix that soon |
o0Ignition0o
added a commit
that referenced
this issue
Apr 19, 2022
fixes #865 When writing a unit test to assert subgraph requests are POST, I noticed the test would never fail. this is because withf only acts as a request router, and panicking (or in our case asserting) within wouldnt cause the router to fail. This commit rewrites a couple of subgraph tests so they properly notify whether they completed successfully or failed.
o0Ignition0o
added a commit
that referenced
this issue
Apr 20, 2022
fixes #865 A regression happened during our switch to Axum which would mark incoming POST requests as GET, thus triggering our forbid_http_mutations layer, and preventing mutations on the router. This PR fixes this, and introduces some tests. More integration or axum oriented tests should follow. When writing a unit test to assert subgraph requests are POST, I noticed the test would never fail. this is because withf only acts as a request router, and panicking (or in our case asserting) within wouldnt cause the router to fail. This commit rewrites a couple of subgraph tests so they properly notify whether they completed successfully or failed.
o0Ignition0o
changed the title
Router performs GET requests to subgraphs
bug: incoming http POST queries are flagged as GET queries by the router
Apr 20, 2022
Ok this was a tricky one, but I've found and fixed it this pull request. We will thus merge it and cut a new release, hopefully tomorrow! TLDR: |
o0Ignition0o
added a commit
that referenced
this issue
Apr 21, 2022
fixes #865 A regression happened during our switch to Axum which would mark incoming POST requests as GET, thus triggering our forbid_http_mutations layer, and preventing mutations on the router. This PR fixes this, and introduces some tests. More integration or axum oriented tests should follow. When writing a unit test to assert subgraph requests are POST, I noticed the test would never fail. this is because withf only acts as a request router, and panicking (or in our case asserting) within wouldnt cause the router to fail. This commit rewrites a couple of subgraph tests so they properly notify whether they completed successfully or failed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
After trying the
router
binary built from master, it looks like every operation performed on subgraphs uses a GET request. This is not a problem for queries, but it's a problem for mutations since our graphql server that implements a subgraph rejects mutation done with a GET rather than a POST. Maybe this started happening after the switch to axum?To Reproduce
Steps to reproduce the behavior:
Expected behavior
The router should work with both graphql queries and mutations
The text was updated successfully, but these errors were encountered: