Question on intercepting GraphQL response #2
Labels
No labels
bug
dependencies
duplicate
enhancement
help wanted
invalid
javascript
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gucheen/fetchql#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello, I have a question I cannot find an answer for and wonder if you can help or if this library can accommodate.
The server I am sending a request to returns a response that is not a JSON object - or graphQL map.
It is actually just returns a 200/ok with a string of comma-separated values like this...
0,4,Received and queued,0,,,0,,,
Each of the values in this string represent a key or name that I need to map so the client receives a readable response. The length of the string and number of values will remain constant.
For example, in this string....
value 1 (0) = 'hostResponseCode'
value 2 (4) = 'hostDetailCode'
value 3 (Received and queued) = 'hostMessage'
value 4 (0) = 'statusCode'
value 5 () = 'statusMessage'
value 6 () = 'etc'
...
I just read in the GraphQL specs in 7.2 Response Format that:
A response to a GraphQL operation must be a map.
Am I out of luck or is there a way I can intercept this response before it is received, assign it to a json object and map these fields? Is your library only for after the response is received?
Thank you for any feedback - this one has me perplexed as I would really like to graphQL my backend....