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

Improve the "missing query string" error message #2941

Closed
markandrus opened this issue Apr 13, 2023 · 0 comments
Closed

Improve the "missing query string" error message #2941

markandrus opened this issue Apr 13, 2023 · 0 comments
Assignees

Comments

@markandrus
Copy link

We're using Apollo Router. One of our customers was experimenting with our API using Postman. They issued a GraphQL request via HTTP GET, but did not put their GraphQL query inside of the query parameter within their URL. Instead, they put it in the request body. This triggered this code in Apollo Router, which caused Apollo Router to return the following error:

{
    "message": "Invalid GraphQL request",
    "extensions": {
        "details": "missing query string",
        "code": "INVALID_GRAPHQL_REQUEST"
    }
}

Can we make this error message clearer? For example,

{
    "message": "Invalid GraphQL request",
    "extensions": {
        "details": "This GraphQL request was sent via an HTTP GET request, but it is missing a \"query\" parameter in the URL",
        "code": "INVALID_GRAPHQL_REQUEST"
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants