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

Graphql requests return non-graphql responses #5171

Open
BrynCooke opened this issue May 15, 2024 · 0 comments
Open

Graphql requests return non-graphql responses #5171

BrynCooke opened this issue May 15, 2024 · 0 comments

Comments

@BrynCooke
Copy link
Contributor

In https://github.com/apollographql/router/blob/dev/apollo-router/src/axum_factory/axum_http_server_factory.rs#L666-L681 we are returning non-graphql errors. This should never be the case inside handle_graphql.

            if let Some(source_err) = err.source() {
                if source_err.is::<RateLimited>() {
                    return RateLimited::new().into_response();
                }
                if source_err.is::<Elapsed>() {
                    return Elapsed::new().into_response();
                }
            }
            if err.is::<RateLimited>() {
                return RateLimited::new().into_response();
            }
            if err.is::<Elapsed>() {
                return Elapsed::new().into_response();
            }

main_router should be checked that if will also never return an error in itself therefore returning a non-graphql error. I don't think that it does, but this needs valdiation.

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

No branches or pull requests

1 participant