Merge branch 'master' into async-context
This commit is contained in:
commit
a48dab5f3b
|
|
@ -30,6 +30,7 @@ import graphql.GraphQLError;
|
|||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
|
@ -51,6 +52,8 @@ public class GraphQLQueryHandler extends JettyJsonHandler {
|
|||
private static final String MESSAGE = "message";
|
||||
|
||||
private final Gson gson = new Gson();
|
||||
private final Type mapOfStringObjectType = new TypeToken<Map<String, Object>>() {
|
||||
}.getType();
|
||||
|
||||
private final String path;
|
||||
|
||||
|
|
@ -75,8 +78,7 @@ public class GraphQLQueryHandler extends JettyJsonHandler {
|
|||
|
||||
JsonObject requestJson = gson.fromJson(request.toString(), JsonObject.class);
|
||||
|
||||
return execute(requestJson.get(QUERY).getAsString(), gson.fromJson(requestJson.get(VARIABLES), new TypeToken<Map<String, Object>>() {
|
||||
}.getType()));
|
||||
return execute(requestJson.get(QUERY).getAsString(), gson.fromJson(requestJson.get(VARIABLES), mapOfStringObjectType));
|
||||
}
|
||||
|
||||
private JsonObject execute(String request, Map<String, Object> variables) {
|
||||
|
|
|
|||
10
pom.xml
10
pom.xml
|
|
@ -17,7 +17,8 @@
|
|||
~
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
|
|
@ -82,7 +83,6 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<compiler.version>1.8</compiler.version>
|
||||
<scala.compiler.version>2.11.7</scala.compiler.version>
|
||||
<powermock.version>1.6.4</powermock.version>
|
||||
<checkstyle.version>6.18</checkstyle.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
|
|
@ -114,13 +114,11 @@
|
|||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<version>${mockito-all.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
@ -140,13 +138,13 @@
|
|||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<version>1.10.19</version>
|
||||
<version>${mockito-all.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
Loading…
Reference in New Issue