You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bit confusing because it leads you to think that there's something wrong with the GraphQL configuration in the application, whereas the actual problem is with the request.
I'm using version 3.3.2 of spring-boot-starter-graphql. The problem should be reproducible with any sample project but I'll attach my own just in case: graphql-demo.zip
You can execute a GraphQL request with the following body to reproduce the issue:
This is actually a Spring Boot enhancement, I've moved the issue accordingly.
In this case, we should return an HTTP 415 status and an "Accept" header that reflects what's expected.
bclozel
changed the title
/graphql endpoint responds with 404 when using an incorrect content type
GraphQL should reply with HTTP 415 for unsupported content type
Aug 1, 2024
Hi,
I receive a 404 response when I try to make a request to the
/graphql
endpoint with a wrong content type (text/plain
, for example):This is a bit confusing because it leads you to think that there's something wrong with the GraphQL configuration in the application, whereas the actual problem is with the request.
I'm using version 3.3.2 of spring-boot-starter-graphql. The problem should be reproducible with any sample project but I'll attach my own just in case:
graphql-demo.zip
You can execute a GraphQL request with the following body to reproduce the issue:
The authentication is basic with a username of "user" and the password written in the application logs.
The text was updated successfully, but these errors were encountered: