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
I am working on handling GraphQL error response in http proxy. In GraphQL responses "errors" is followed by "data" section.
If "errors" was first field followed by "data", it would be easier for http proxies to parse initial few bytes of response and detect errors. With current spec, json processor will have to continue parsing "data" then search for "errors", which is adding cost to http proxy. If "errors" was the first field, it would have been much easier for http streaming proxy to buffer first few bytes of the response, look for errors if not found continue with streaming. Current implementations do not work well with streaming proxy, in addition adds extra cost of parsing "data" just for detecting "errors".
The text was updated successfully, but these errors were encountered:
I am working on handling GraphQL error response in http proxy. In GraphQL responses "errors" is followed by "data" section.
If "errors" was first field followed by "data", it would be easier for http proxies to parse initial few bytes of response and detect errors. With current spec, json processor will have to continue parsing "data" then search for "errors", which is adding cost to http proxy. If "errors" was the first field, it would have been much easier for http streaming proxy to buffer first few bytes of the response, look for errors if not found continue with streaming. Current implementations do not work well with streaming proxy, in addition adds extra cost of parsing "data" just for detecting "errors".
The text was updated successfully, but these errors were encountered: