forked from subsquid/squid-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
64 lines (60 loc) · 1.35 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
type Metadata @entity @cardinality(value: 100) {
id: ID!
specName: String!
specVersion: Int
blockHeight: Int!
blockHash: String!
hex: String! @byteWeight(value: 1000.0)
}
type Block @entity {
id: ID!
height: Int!
hash: String!
parentHash: String!
stateRoot: String!
extrinsicsRoot: String!
timestamp: DateTime!
spec: Metadata!
validator: String
events: [Event!]! @derivedFrom(field: "block") @cardinality(value: 1000)
calls: [Call!]! @derivedFrom(field: "block") @cardinality(value: 1000)
extrinsics: [Extrinsic!]! @derivedFrom(field: "block") @cardinality(value: 1000)
}
type Call @entity {
id: ID!
parent: Call
block: Block!
extrinsic: Extrinsic!
success: Boolean!
error: JSON
origin: JSON
name: String!
args: JSON @byteWeight(value: 5.0)
pos: Int!
}
type Event @entity {
id: ID!
block: Block!
indexInBlock: Int!
phase: String!
extrinsic: Extrinsic
call: Call
name: String!
args: JSON @byteWeight(value: 5.0)
pos: Int!
}
type Extrinsic @entity {
id: ID!
block: Block!
indexInBlock: Int!
version: Int!
signature: JSON
success: Boolean!
error: JSON
call: Call!
fee: BigInt
tip: BigInt
hash: String!
pos: Int!
calls: [Call!] @derivedFrom(field: "extrinsic") @cardinality(value: 5)
}