File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,16 @@ type ResponseInfo struct {
5555 Request * http.Request
5656 // ResponseHeaders contains a clone of the headers of the response from the subgraph.
5757 ResponseHeaders http.Header
58+ // ResponseBody contains the response body of the subgraph, it is of type string so that it cannot be manipulated.
59+ ResponseBody string
5860}
5961
6062func newResponseInfo (res * result , subgraphError error ) * ResponseInfo {
61- responseInfo := & ResponseInfo {StatusCode : res .statusCode , Err : goerrors .Join (res .err , subgraphError )}
63+ responseInfo := & ResponseInfo {
64+ StatusCode : res .statusCode ,
65+ Err : goerrors .Join (res .err , subgraphError ),
66+ ResponseBody : res .out .String (),
67+ }
6268 if res .httpResponseContext != nil {
6369 // We're using the response.Request here, because the body will be nil (since the response was read) and won't
6470 // cause a memory leak.
You can’t perform that action at this time.
0 commit comments