-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathschema.graphql
63 lines (57 loc) · 1.07 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
type Block @entity {
id: ID!
number: BigInt! @index(unique: true)
hash: String
timestamp: Date
parentHash: String
specVersion: Int
stateRoot: String
extrinsicsRoot: String
extrinsics: [Extrinsic] @derivedFrom(field: "block")
events: [Event] @derivedFrom(field: "block")
}
type Extrinsic @entity {
id: ID!
hash: String!
block: Block!
blockNumber: BigInt! @index(unique: false)
index: Int!
isSigned: Boolean
signer: Account
section: String
method: String
success: Boolean
}
type Event @entity {
id: ID!
block: Block!
blockNumber: BigInt! @index(unique: false)
index: Int!
section: String
method: String
extrinsic: Extrinsic
}
type Transfer @entity {
id: ID!
from: Account!
to: Account!
value: BigInt!
block: Block!
blockNumber: BigInt!
extrinsicIndex: Int
eventIndex: Int!
}
type Account @entity {
id: ID!
extrinsics: [Extrinsic] @derivedFrom(field: "signer")
}
type Day @entity {
id: ID!
year: Int!
month: Int!
date: Int!
extrinsics: Int!
events: Int!
transferCount: Int!
transferAmount: BigInt!
}