-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.graphql
104 lines (97 loc) · 1.86 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
type CollectionEntity @entity {
blockNumber: BigInt
burned: Boolean!
createdAt: DateTime!
currentOwner: String!
distribution: Int!
events: [CollectionEvent!] @derivedFrom(field: "collection")
floor: BigInt!
highestSale: BigInt!
id: ID!
image: String
issuer: String!
media: String
meta: MetadataEntity
metadata: String
name: String @index
nftCount: Int!
nfts: [NFTEntity!] @derivedFrom(field: "collection")
ownerCount: Int!
supply: Int!
updatedAt: DateTime!
volume: BigInt!
}
type NFTEntity @entity {
blockNumber: BigInt
burned: Boolean!
collection: CollectionEntity!
createdAt: DateTime!
currentOwner: String! @index
events: [Event!] @derivedFrom(field: "nft")
hash: String! @index
id: ID!
image: String
issuer: String!
media: String
meta: MetadataEntity
metadata: String
name: String @index
price: BigInt
recipient: String
royalty: Float
sn: String!
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
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 implements EventType @entity {
id: ID!
blockNumber: BigInt
timestamp: DateTime!
caller: String!
currentOwner: String # currentOwner
interaction: Interaction!
meta: String!
collection: CollectionEntity!
}
enum Interaction {
BURN
BUY
CREATE
DESTROY
LIST
MINT
SEND
UNLIST
}