admin管理员组文章数量:1123093
If in Postman I send a request to using the Postman UI Body selection GraphQL, then Postman sends the request using Content-Type: application-json
and in the console I see the Request Body
query: "query {
boards {
columns {
id
title
type
}
}
}"
variables: ""
Which is really confusing, since that request body isn't valid JSON at all. But the request succeeds.
If I manually set Content-Type: application/graphql
and request body
query: "query {
boards {
columns {
id
title
type
}
}
}"
variables: ""
Then Monday returns
{
"errors": [
{
"message": "'content-type' header must be one of: \"application/json\" or \"application/graphql-response+json\"",
"extensions": {
"code": "INVALID_CONTENT_TYPE_HEADER"
}
}
],
"account_id": null
}
If I set Content-Type: application/graphql-response+json
then Monday returns
{
"errors": [
{
"message": "Invalid GraphQL request",
"extensions": {
"details": "failed to deserialize the request body into JSON: expected value at line 1 column 1",
"code": "INVALID_GRAPHQL_REQUEST"
}
}
],
"account_id": 3063938
}
What's going on?
I can escape the GraphQL payload and send it as application/json and that will work, but this makes the payload unreadable, so I'd rather send it as an application/graphql
payload.
Sending an application/graphql payload to the Postman api works fine. But a request formatted the same way doesn't work with the Monday api.
How do I get this to work.
本文标签: postmanWhy doesn39t the Monday API support applicationgraphqlStack Overflow
版权声明:本文标题:postman - Why doesn't the Monday API support applicationgraphql? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736548210a1944477.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论