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

Router config: Wildcards in supergraph endpoint path do not longer work #2471

Closed
pieterwillaert opened this issue Jan 25, 2023 · 2 comments · Fixed by #2472
Closed

Router config: Wildcards in supergraph endpoint path do not longer work #2471

pieterwillaert opened this issue Jan 25, 2023 · 2 comments · Fixed by #2472
Assignees

Comments

@pieterwillaert
Copy link

pieterwillaert commented Jan 25, 2023

since version 1.8
https://www.apollographql.com/docs/router/configuration/overview#endpoint-path

for example: When starting the application with this router config

supergraph:
  # The path for GraphQL execution
  # (Defaults to /)
  path: /*

this appears in the logs:

2023-01-25T11:55:24.877417Z  INFO healthcheck endpoint exposed at http://0.0.0.0:8088/health
2023-01-25T11:55:24.877519Z  INFO GraphQL endpoint exposed at http://127.0.0.1:4000/* 🚀

requests to http://127.0.0.1:4000 results in a http 404, the healthcheck works fine

Also without the asterisk it work.

@bnjjj bnjjj self-assigned this Jan 25, 2023
@bnjjj
Copy link
Contributor

bnjjj commented Jan 25, 2023

It has been introduced by the axum upgrade https://github.com/tokio-rs/axum/releases/tag/axum-v0.6.0 they introduced a breaking change which means it only matches on test.com/ and not test.com if you provided /*. But in that specific case (/*) it would make sense to also add the support to test.com. But if you're providing /whatever/* it doesn't make sense to apply that specific rule

I will open a PR for this

bnjjj added a commit that referenced this issue Jan 26, 2023
…oute without path (#2472)

- Fix #2471

If you provide this configuration:

```yaml
supergraph:
  # The path for GraphQL execution
  # (Defaults to /)
  path: /*
```

Since release `1.8` and due to [axum
upgrade](https://github.com/tokio-rs/axum/releases/tag/axum-v0.6.0) it
won't listen on `localhost` without a path. This PR intend to fix the
axum routing behavior.

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
@pieterwillaert
Copy link
Author

Thanks for the fast solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants