Add application topology query type

This commit is contained in:
gaohongtao 2017-12-25 22:28:00 +08:00
parent 91922544d4
commit 8ae1b4213b
2 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,21 @@
schema {
query: Query
}
type Query {
version: String
}
type Duration{
start: String! # https://www.ietf.org/rfc/rfc3339.txt
end: String!
step: Step!
}
enum Step{
MONTH
DAY
HOUR
MINUTE
SECOND
}

View File

@ -0,0 +1,38 @@
type ApplicationTopology {
nodes: [Node]!
edges: [Edge]
duration: Duration!
}
interface Node {
id: ID!
name: String!
type: String
}
type ApplicationNode implements Node {
id: ID!
name: String!
type: String
sla: Float!
calls: Long!
apdex: Float!
totalInstance: Int!
totalAlert: Int!
}
type ResourceNode implements Node {
id: ID!
name: String!
type: String
}
type Edge {
source: ID!
target: ID!
isAlert: Boolean
}
extend type Query {
getApplicationTopology: ApplicationTopology
}