Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
a48dab5f
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 大约 1 年
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
a48dab5f
编写于
3月 15, 2019
作者:
wu-sheng
提交者:
GitHub
3月 15, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into async-context
上级
5a2b223c
05b0498f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
8 deletion
+8
-8
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/GraphQLQueryHandler.java
...che/skywalking/oap/query/graphql/GraphQLQueryHandler.java
+4
-2
pom.xml
pom.xml
+4
-6
未找到文件。
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/GraphQLQueryHandler.java
浏览文件 @
a48dab5f
...
...
@@ -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
)
{
...
...
pom.xml
浏览文件 @
a48dab5f
...
...
@@ -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>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录