-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.graphql
76 lines (63 loc) · 1.51 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
type BaseMetric @entity {
id: ID!
type: EventType!
transactionMetadata: TransactionMetadata!
params: MetricParam
}
type TransactionMetadata @entity {
id: ID! # The TxHash toHex()
txValue: BigInt!
timestamp: BigInt!
blockNumber: BigInt!
txTo: Bytes
txFrom: Bytes!
txGas: BigInt!
}
type InMemoryIncrementStore @entity {
id: ID! # Always 1 = store this const in the mapping and always just retrieve it - then incrementValue++ when new even
incrementValue: BigInt!
}
type EventType @entity {
id: ID! #ToHex of EventName
}
type MetricParam @entity {
id: ID!
paramName1: String
paramValue1: String
paramType1: String
paramName2: String
paramValue2: String
paramType2: String
paramName3: String
paramValue3: String
paramType3: String
paramName4: String
paramValue4: String
paramType4: String
paramName5: String
paramValue5: String
paramType5: String
paramName6: String
paramValue6: String
paramType6: String
}
type BadgeType @entity {
id: ID!
name: String! #The Badge
ipfs: String! #The
soul: BigInt!
linkingParam: String! # This is what ties a baseMetric to a user
baseMetric: [BadgeMetricLookup!] #The base
}
type BadgeMetricLookup @entity {
id: ID! #Combination of BaseMetric ID + BaseID
badge: BadgeType! #Combination of
baseMetric: BaseMetric!
}
type UserBadge @entity {
id: ID! #BadgeTypeID + UserAddress
badge: BadgeType! #Combination of
account: Bytes!
vanityValue: Bytes! # HOW MUCH THEY HAVE CURATED IN TOTALITY
vanityName: Bytes! #
}