-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
148 lines (128 loc) · 2.08 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
type Count @entity {
id: ID!
orderTotal: Int!
orderSW: Int!
orderGF: Int!
orderBP: Int!
nftTotal: Int!
swTotal: Int!
gfTotal: Int!
bpTotal: Int!
salesTotal: Int!
}
enum NFTType @entity{
mysteryBox
card
fragment
}
enum OrderStatus @entity {
open
sold
cancelled
}
enum Tribe @entity {
solarian
andromedian
scultpian
mercenary
}
enum FilterType @entity{
genomic
blueprint
character
attribute
}
enum NFTClass @entity{
tanker
nuker
fighter
supporter
bionic
kinetic
electric
radiation
gravitation
}
enum Part @entity{
gear
drone
suite
bot
weapon
}
enum Rarity @entity{
common
rare
epic
legendary
limited
}
enum Camp @entity{
venus
titan
europa
earth
mars
}
enum Fragment @entity{
genomic
blueprint
}
type Order @entity {
id: ID!
buyWithERC20Address: Bytes!
nft: NFT
nftAddress: Bytes!
tokenId: BigInt!
txHash: Bytes!
owner: Bytes!
buyer: Bytes
price: BigInt!
status: OrderStatus!
blockNumber: BigInt!
#expiresAt: BigInt!
createdAt: BigInt!
updatedAt: BigInt!
}
type Account @entity {
id: ID! # ETH addr
address: Bytes!
nfts: [NFT!] @derivedFrom(field: "owner")
}
type NFT @entity {
id: ID!
isMysteryBox: Boolean!
partCode: String!
tokenId: BigInt!
contractAddress: Bytes!
owner: Account!
tokenURI: String!
nftType: NFTType!
level: BigInt
nftClass: NFTClass
part: Part
rarity: Rarity
camp: Camp
fragment: Fragment
tribe: Tribe
amount: BigInt!
orders: [Order!] @derivedFrom(field: "nft") # History of all orders. Should only ever be ONE open order. all others must be cancelled or sold
activeOrder: Order
name: String
image: String!
createdAt: BigInt!
updatedAt: BigInt!
codeGear: String
codeDrone: String
codeSuite: String
codeBot: String
codeWeapon: String
codeGenome: String
# search indexes
searchOrderStatus: OrderStatus
searchOrderPrice: BigInt
searchOrderExpiresAt: BigInt
searchOrderCreatedAt: BigInt
searchText: String
}
#https://github.com/decentraland/marketplace/blob/master/indexer/schema.graphql