-
Notifications
You must be signed in to change notification settings - Fork 0
/
db-schema.graphql
58 lines (52 loc) · 1.23 KB
/
db-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
type Multisig {
id: ID!
# The @search annotation allows us to query the list of multisigs and filter
# by (chainId, address) pairs. We use "hash" since we only need exact matches.
# See https://dgraph.io/docs/graphql/schema/directives/search/#string
chainId: String! @search(by: [hash])
address: String! @search(by: [hash])
creator: String @search(by: [hash])
pubkeyJSON: String! @search(by: [fulltext])
transactions: [Transaction] @hasInverse(field: creator)
}
type Transaction {
id: ID!
txHash: String
creator: Multisig
dataJSON: String!
signatures: [Signature] @hasInverse(field: transaction)
}
type Signature {
transaction: Transaction!
bodyBytes: String!
signature: String!
address: String!
}
type Nonce {
id: ID!
chainId: String! @search(by: [hash])
address: String! @search(by: [hash])
nonce: Int!
}
enum BaseTransactionState {
Pending
InProgress
Completed
}
type BaseTransaction {
id: ID!
state: BaseTransactionState!
serialNumber: Int!
description: String
fromAddress: String!
toAddress: String!
amount: String!
denom: String!
chainRegistryName: String!
}
type TransactionInProgress {
id: ID!
created: Int64
baseTransaction: BaseTransaction
transaction: Transaction
}