Question on intercepting GraphQL response #2

Closed
opened 2016-06-23 11:49:50 +08:00 by rjpalermo1 · 0 comments
rjpalermo1 commented 2016-06-23 11:49:50 +08:00 (Migrated from github.com)

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....

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....
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gucheen/fetchql#2
No description provided.