forked from kodadot/rubick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
162 lines (147 loc) · 2.67 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
type RemarkEntity @entity {
id: ID! #id is a required field
value: String!
caller: String!
blockNumber: String!
interaction: String
}
type FailedEntity @entity {
id: ID! #id is a required field
value: String!
reason: String!
interaction: String
}
type CollectionEntity @entity {
version: String
name: String @index
max: Int!
issuer: String
symbol: String
id: ID!
metadata: String
currentOwner: String
nfts: [NFTEntity!] @derivedFrom(field: "collection")
events: [CollectionEvent!]
blockNumber: BigInt
meta: MetadataEntity
createdAt: DateTime!
}
type NFTEntity @entity {
name: String @index
instance: String
transferable: Int
collection: CollectionEntity!
issuer: String
sn: String
id: ID!
hash: String! @index
metadata: String
currentOwner: String @index
price: BigInt!
burned: Boolean!
blockNumber: BigInt
events: [Event!] @derivedFrom(field: "nft")
emotes: [Emote!] @derivedFrom(field: "nft")
meta: MetadataEntity
createdAt: DateTime!
updatedAt: DateTime!
}
type MetadataEntity @entity {
id: ID!
name: String
description: String
image: String
attributes: [Attribute!]
animationUrl: String
type: String
}
type Attribute @jsonField {
display: String
trait: String
value: String!
}
interface EventType {
id: ID!
blockNumber: BigInt
timestamp: DateTime!
caller: String!
currentOwner: String # currentOwner
interaction: Interaction!
meta: String!
}
type Event implements EventType @entity {
id: ID!
blockNumber: BigInt
timestamp: DateTime!
caller: String!
currentOwner: String! # currentOwner
interaction: Interaction!
meta: String!
nft: NFTEntity!
}
type CollectionEvent @jsonField {
blockNumber: String
timestamp: DateTime
caller: String!
interaction: String!
meta: String!
}
type Emote @entity {
id: ID!
nft: NFTEntity!
caller: String!
value: String!
}
enum Interaction {
MINT
MINTNFT
LIST
UNLIST
BUY
SEND
CONSUME
CHANGEISSUER
EMOTE
}
type Series @entity {
id: ID!
issuer: String,
unique: Int!
uniqueCollectors: Int!
sold: Int! @index
total: Int!
averagePrice: Float
floorPrice: BigInt
highestSale: BigInt
buys: Int
volume: BigInt
name: String! @index
metadata: String
image: String
emoteCount: Int
}
type Spotlight @entity {
id: ID!
collections: Int!
uniqueCollectors: Int!
unique: Int!
sold: Int! @index
total: Int!
average: Float
volume: BigInt
}
type Collector @entity {
id: ID!
name: String!
unique: Int!
uniqueCollectors: Int!
collections: Int!
total: Int!
average: Float
volume: BigInt @index
max: BigInt
}
type CacheStatus @entity {
id: ID!
lastBlockTimestamp: DateTime!
}