File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/main/java/graphql/servlet Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ repositories {
1515}
1616
1717dependencies {
18- compile 'graphql-java-servlet:graphql-java-servlet:0.6.0 '
18+ compile 'graphql-java-servlet:graphql-java-servlet:0.6.1 '
1919}
2020```
2121
Original file line number Diff line number Diff line change 1414 */
1515package graphql .servlet ;
1616
17+ import com .fasterxml .jackson .annotation .JsonRawValue ;
18+ import com .fasterxml .jackson .core .type .TypeReference ;
1719import com .fasterxml .jackson .databind .ObjectMapper ;
1820import com .google .common .io .CharStreams ;
1921import graphql .*;
@@ -159,8 +161,14 @@ public String executeQuery(String query) {
159161 public static class Request {
160162 @ Getter @ Setter
161163 private String query ;
162- @ Getter @ Setter
164+ @ Getter
163165 private Map <String , Object > variables = new HashMap <>();
166+
167+ @ SneakyThrows
168+ public void setVariables (String variables ) {
169+ this .variables = new ObjectMapper ().readValue (variables , new TypeReference <Map <String , Object >>() {});
170+ }
171+
164172 @ Getter @ Setter
165173 private String operationName ;
166174 }
You can’t perform that action at this time.
0 commit comments