-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathschema.graphql
124 lines (95 loc) · 2 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# To improve query performance, we strongly suggest adding indexes to any field that you plan to filter or sort by
# Add the `@index` or `@index(unique: true)` annotation after any non-key field
# https://academy.subquery.network/build/graphql.html#indexing-by-non-primary-key-field
type StarterEntity @entity {
id: ID! # Transaction hash
hash: String
account: String
balance: BigInt
date: Date
status: Boolean
}
type KVData @jsonField {
key: String
value: String
type: String
}
type Block @entity {
id: ID!
number: BigInt
timestamp: Date
parentHash: String
specVersion: String
stateRoot: String
extrinsicRoot: String
extrinsics: [Extrinsic] @derivedFrom(field: "block")
events: [Event] @derivedFrom(field: "block")
}
type Extrinsic @entity {
id: ID!
method: String
section: String
args: [KVData]
signer: Account
nonce: BigInt
timestamp: Date
signature: String
tip: String
isSigned: Boolean
isSuccess: Boolean
block: Block
events: [Event] @derivedFrom(field: "extrinsic")
calls: [Call] @derivedFrom(field: "extrinsic")
}
type Call @entity {
id: ID!
section: String
method: String
args:[KVData]
timestamp: Date
isSuccess: Boolean
signer: Account
extrinsic: Extrinsic
parentCall: Call
calls: [Call] @derivedFrom(field: "parentCall")
}
type Event @entity {
id: ID!
index: Int
section: String
method: String
data: [KVData]
timestamp: Date
blockNumber: BigInt
block: Block
extrinsic: Extrinsic
}
type Account @entity {
id: ID!
txCount: BigInt
createAtBlock: Block
extrinsics: [Extrinsic] @derivedFrom(field: "signer")
calls: [Call] @derivedFrom(field: "signer")
}
type Schema @entity {
id: ID!
creator: String
identifier: String
revoked: Boolean
}
type Registry @entity {
id: ID!
creator: String
identifier: String
schema: Schema
timestamp: Date
archived: Boolean
}
type Stream @entity {
id: ID!
identifier: String
creator: String
hash: String
registry: Registry
revoked: Boolean
}