未验证 提交 a48dab5f 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Merge branch 'master' into async-context

...@@ -30,6 +30,7 @@ import graphql.GraphQLError; ...@@ -30,6 +30,7 @@ import graphql.GraphQLError;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -51,6 +52,8 @@ public class GraphQLQueryHandler extends JettyJsonHandler { ...@@ -51,6 +52,8 @@ public class GraphQLQueryHandler extends JettyJsonHandler {
private static final String MESSAGE = "message"; private static final String MESSAGE = "message";
private final Gson gson = new Gson(); private final Gson gson = new Gson();
private final Type mapOfStringObjectType = new TypeToken<Map<String, Object>>() {
}.getType();
private final String path; private final String path;
...@@ -75,8 +78,7 @@ public class GraphQLQueryHandler extends JettyJsonHandler { ...@@ -75,8 +78,7 @@ public class GraphQLQueryHandler extends JettyJsonHandler {
JsonObject requestJson = gson.fromJson(request.toString(), JsonObject.class); JsonObject requestJson = gson.fromJson(request.toString(), JsonObject.class);
return execute(requestJson.get(QUERY).getAsString(), gson.fromJson(requestJson.get(VARIABLES), new TypeToken<Map<String, Object>>() { return execute(requestJson.get(QUERY).getAsString(), gson.fromJson(requestJson.get(VARIABLES), mapOfStringObjectType));
}.getType()));
} }
private JsonObject execute(String request, Map<String, Object> variables) { private JsonObject execute(String request, Map<String, Object> variables) {
......
...@@ -17,7 +17,8 @@ ...@@ -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> <modelVersion>4.0.0</modelVersion>
<groupId>org.apache.skywalking</groupId> <groupId>org.apache.skywalking</groupId>
...@@ -82,7 +83,6 @@ ...@@ -82,7 +83,6 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<compiler.version>1.8</compiler.version> <compiler.version>1.8</compiler.version>
<scala.compiler.version>2.11.7</scala.compiler.version>
<powermock.version>1.6.4</powermock.version> <powermock.version>1.6.4</powermock.version>
<checkstyle.version>6.18</checkstyle.version> <checkstyle.version>6.18</checkstyle.version>
<junit.version>4.12</junit.version> <junit.version>4.12</junit.version>
...@@ -114,13 +114,11 @@ ...@@ -114,13 +114,11 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId> <artifactId>mockito-all</artifactId>
<version>${mockito-all.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
...@@ -140,13 +138,13 @@ ...@@ -140,13 +138,13 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId> <artifactId>mockito-all</artifactId>
<version>1.10.19</version> <version>${mockito-all.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册