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
According to GraphQL Serving over HTTP, If the "application/graphql" Content-Type header is present, treat the HTTP POST body contents as the GraphQL query string.
But following code can not work and 404 error thrown.
POST http://localhost:8080/graphql
Content-Type: application/graphql
query {
bookById(id: "book-1") {
id
name
pageCount
author {
firstName
lastName
}
}
}
According to GraphQL Serving over HTTP,
If the "application/graphql" Content-Type header is present, treat the HTTP POST body contents as the GraphQL query string.
But following code can not work and 404 error thrown.
You should use application/json instead.
application/graphql has good support for code completion especially in JetBrains IDEs and GraphQL plugin.
The text was updated successfully, but these errors were encountered: