-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
160 lines (148 loc) · 2.88 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
type CollectionEntity @entity {
baseUri: String
blockNumber: BigInt @index
# burned: Boolean!
createdAt: DateTime! @index
currentOwner: String!
distribution: Int! # dummy
events: [CollectionEvent!] @derivedFrom(field: "collection")
floor: BigInt! #@index dummy
hash: String! @unique
highestSale: BigInt! #@index dummy
id: ID!
image: String
issuer: String!
kind: Kind
max: Int
media: String
meta: MetadataEntity
metadata: String
name: String @index
nftCount: Int! #@index dummy
nfts: [NFTEntity!] @derivedFrom(field: "collection")
ownerCount: Int! # dummy
supply: Int! @index # dummy
symbol: String # dummy
type: CollectionType!
updatedAt: DateTime! @index
version: Int! # dummy
volume: BigInt! #@index dummy
}
type NFTEntity @entity {
blockNumber: BigInt @index
burned: Boolean!
collection: CollectionEntity!
createdAt: DateTime! @index
currentOwner: String! @index
events: [Event!] @derivedFrom(field: "nft")
hash: String! @index
id: ID!
image: String
issuer: String!
lewd: Boolean!
media: String
meta: MetadataEntity
metadata: String
name: String @index
price: BigInt #@index
recipient: String
royalty: Float
sn: BigInt! @index
updatedAt: DateTime!
version: Int!
token: TokenEntity
}
type TokenEntity @entity {
id: ID!
blockNumber: BigInt
collection: CollectionEntity
nfts: [NFTEntity!] @derivedFrom(field: "token")
hash: String! @index
image: String
media: String
name: String @index
updatedAt: DateTime!
createdAt: DateTime!
count: Int!
}
type MetadataEntity @entity {
id: ID!
name: String
description: String
image: String
attributes: [Attribute!]
animationUrl: String
type: String
banner: String
kind: Kind
}
type Attribute @jsonField {
display: String
trait: String
value: String!
}
interface EventType {
id: ID!
blockNumber: BigInt
timestamp: DateTime!
caller: String!
currentOwner: String
interaction: Interaction!
# version: Int!
meta: String!
}
type Event implements EventType @entity {
id: ID!
blockNumber: BigInt
timestamp: DateTime!
caller: String!
currentOwner: String! # currentOwner
interaction: Interaction!
meta: String!
nft: NFTEntity!
# version: Int!
}
type CollectionEvent implements EventType @entity {
id: ID!
blockNumber: BigInt
timestamp: DateTime!
caller: String!
currentOwner: String # currentOwner
interaction: Interaction!
meta: String!
collection: CollectionEntity!
# version: Int!
}
enum CollectionType {
ERC721
ERC1155
}
enum Interaction {
BURN
BUY
CREATE
LIST
MINT
SEND
UNLIST
# LOCK
}
enum Kind {
poap
pfp
genart
mixed
# audio
# video
}
# type AssetEntity @entity {
# id: ID!
# name: String
# symbol: String
# decimals: Int
# }
# Entity to represent when the cache was last updated
# type CacheStatus @entity {
# id: ID!
# lastBlockTimestamp: DateTime!
# }