-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathschema.graphql
56 lines (50 loc) · 1.06 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
type _Schema_
@fulltext(
name: "snapshotQuery"
language: en
algorithm: rank
include: [{ entity: "Snapshot", fields: [{ name: "epochString" }, { name: "stateRootString" }] }]
)
type Inbox @entity(immutable: true) {
id: Bytes! # address
messages: [Snapshot!]! @derivedFrom(field: "inbox")
}
type Message @entity {
id: ID!
txHash: Bytes!
timestamp: BigInt!
from: Bytes!
to: Bytes!
snapshot: Snapshot!
data: Bytes!
}
type Snapshot @entity {
id: ID!
inbox: Inbox! # address
epoch: BigInt
epochString: String
caller: Bytes
txHash: Bytes
timestamp: BigInt
stateRoot: Bytes
stateRootString: String
messages: [Message!]! @derivedFrom(field: "snapshot")
numberMessages: BigInt!
taken: Boolean!
resolving: Boolean!
fallback: [Fallback!]! @derivedFrom(field: "snapshot")
}
type Fallback @entity {
id: ID!
snapshot: Snapshot!
executor: Bytes!
timestamp: BigInt
txHash: Bytes!
ticketId: Bytes!
}
type Ref @entity {
id: ID!
inbox: Inbox! # address
currentSnapshotIndex: BigInt!
nextMessageIndex: BigInt!
}