Skip to content

Commit 84027a6

Browse files
author
lu.jin
committed
updated ts type to Timestamp
1 parent 19446eb commit 84027a6

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
```graphql
2121
type FirefightingData {
22-
ts: Int! # 时间戳,若是时序数据必须定义,并且字段名固定为 `ts`
22+
ts: Timestamp! # 时间戳,若是时序数据必须定义,并且字段名固定为 `ts`
2323
building: String! # 指标属性(层级),根据业务数据定义,非必须
2424
floor: String! # 指标属性(层级),根据业务数据定义,非必须
2525
indicator: String! # 指标属性(层级),根据业务数据定义,非必须
@@ -220,7 +220,7 @@ go run server.go
220220
"name": null,
221221
"kind": "NON_NULL",
222222
"ofType": {
223-
"name": "Int"
223+
"name": "Timestamp"
224224
}
225225
}
226226
},
@@ -322,6 +322,11 @@ go run server.go
322322
"kind": "SCALAR",
323323
"fields": []
324324
},
325+
{
326+
"name": "Timestamp",
327+
"kind": "SCALAR",
328+
"fields": []
329+
},
325330
{
326331
"name": "VendorOnmake",
327332
"kind": "OBJECT",

graph/schema.graphqls

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
scalar Timestamp
2+
13
type FirefightingData {
2-
ts: Int!
4+
ts: Timestamp!
35
building: String!
46
floor: String!
57
indicator: String!
68
value: Int!
79
}
810

911
type FactoryData {
10-
ts: Int!
12+
ts: Timestamp!
1113
building: String!
1214
area: String!
1315
value: Int!

0 commit comments

Comments
 (0)