File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
main/java/graphql/kickstart/spring/webclient/boot
test/java/graphql/kickstart/spring/webclient/boot Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,15 @@ public class GraphQLResponse {
1515
1616 public static final String ERRORS_FIELD = "errors" ;
1717
18+ @ Getter
19+ private final String rawResponse ;
1820 private final JsonNode data ;
1921 @ Getter
2022 private final List <GraphQLError > errors ;
2123 private final ObjectMapper objectMapper ;
2224
2325 GraphQLResponse (String rawResponse , ObjectMapper objectMapper ) {
26+ this .rawResponse = rawResponse ;
2427 this .objectMapper = objectMapper ;
2528
2629 JsonNode tree = readTree (rawResponse );
Original file line number Diff line number Diff line change @@ -95,4 +95,10 @@ void getList_dataFieldExists_returnsList() {
9595 assertEquals ("value" , values .get (0 ));
9696 }
9797
98+ @ Test
99+ void getRawResponse () {
100+ GraphQLResponse response = constructResponse ("{ \" data\" : null }" );
101+ assertEquals ("{ \" data\" : null }" , response .getRawResponse ());
102+ }
103+
98104}
You can’t perform that action at this time.
0 commit comments