Context creation failed - graphql
See original GitHub issueHello, can you tell me
Have request: `@authToken = {eyJraWQiOiIwN1Zj}
POST http://localhost:5000/graphql Authorization: {{authToken}} X-REQUEST-TYPE: GraphQL
query listProducts{ fakturaAssist{ listProducts{ id name productNumber } } }`
Getting an error: `HTTP/1.1 500 Internal Server Error content-type: application/json; charset=utf-8 access-control-allow-credentials: true vary: origin access-control-expose-headers: WWW-Authenticate,Server-Authorization cache-control: no-cache content-length: 222 Date: Fri, 13 Mar 2020 12:20:48 GMT Connection: close
{
“errors”: [
{
“message”: “Context creation failed: Cannot destructure property payload
of ‘undefined’ or ‘null’… Request id: offline_awsRequestId_ck7q5gknc01d24oy29fet2gsi”,
“extensions”: {
“code”: “INTERNAL_SERVER_ERROR”
}
}
]
}`
if a send request: `POST http://localhost:5000/graphql Content-Type: application/json; charset=utf-8 Authorization: {{authToken}}
query listProducts{ fakturaAssist{ listProducts{ id name productNumber } } }`
Have answer:
HTTP/1.1 200 OK content-type: application/json; charset=utf-8 vary: origin access-control-allow-credentials: true access-control-expose-headers: WWW-Authenticate,Server-Authorization cache-control: no-cache content-length: 0 Date: Fri, 13 Mar 2020 12:22:09 GMT Connection: close
and warning:
The content type of response is application/json, while response body is not a valid json string
how can I get a response from a request for graphql?
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (9 by maintainers)
@Huachao You are a great person and super support for the project! Good luck! It worked, thanks!)
@zAndrey95 I mean maybe you should remove the
{
and}
in the file variable value. You can check the two screenshots you provided, the worked version without{
and}
, the not-working one has