File tree 2 files changed +9
-0
lines changed
main/java/graphql/kickstart/spring/webclient/boot
test/java/graphql/kickstart/spring/webclient/boot
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,15 @@ public class GraphQLResponse {
15
15
16
16
public static final String ERRORS_FIELD = "errors" ;
17
17
18
+ @ Getter
19
+ private final String rawResponse ;
18
20
private final JsonNode data ;
19
21
@ Getter
20
22
private final List <GraphQLError > errors ;
21
23
private final ObjectMapper objectMapper ;
22
24
23
25
GraphQLResponse (String rawResponse , ObjectMapper objectMapper ) {
26
+ this .rawResponse = rawResponse ;
24
27
this .objectMapper = objectMapper ;
25
28
26
29
JsonNode tree = readTree (rawResponse );
Original file line number Diff line number Diff line change @@ -95,4 +95,10 @@ void getList_dataFieldExists_returnsList() {
95
95
assertEquals ("value" , values .get (0 ));
96
96
}
97
97
98
+ @ Test
99
+ void getRawResponse () {
100
+ GraphQLResponse response = constructResponse ("{ \" data\" : null }" );
101
+ assertEquals ("{ \" data\" : null }" , response .getRawResponse ());
102
+ }
103
+
98
104
}
You can’t perform that action at this time.
0 commit comments