-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
73 lines (68 loc) · 1.43 KB
/
schema.graphql
File metadata and controls
73 lines (68 loc) · 1.43 KB
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
# Owner ---
type Owner @entity {
id: ID!
address: String!
ownedCollections: [Collection!]! @derivedFrom(field: "owner")
ownedCatalogs: [Catalog!]! @derivedFrom(field: "owner")
ownedTokens: [Token!]! @derivedFrom(field: "owner")
collectionBalance: BigInt!
catalogBalance: BigInt!
balance: BigInt!
}
# Collection ---
type Collection @entity {
id: ID!
address: String!
owner: Owner!
name: String
symbol: String
metadataURI: String!
totalSupply: BigInt
createAtBlock: BigInt!
transactionHash: String!
tokens: [Token!]! @derivedFrom(field: "collection")
}
# Token ---
type Token @entity {
id: ID!
tokenId: BigInt!
owner: Owner
collection: Collection
createAtBlock: BigInt!
transactionHash: String!
transfers: [Transfer!]! @derivedFrom(field: "token")
}
type Transfer @entity {
id: ID!
token: Token!
# Empty `from` is minting
from: Owner
# Empty `to` is burning
to: Owner
timestamp: BigInt!
block: BigInt!
transactionHash: String!
}
# Catalog ---
type Catalog @entity {
id: ID!
address: String!
owner: Owner!
metadataURI: String!
type: String!
createAtBlock: BigInt!
transactionHash: String!
parts: [Part!]! @derivedFrom(field: "catalog")
}
type Part @entity {
id: ID!
catalog: Catalog!
partId: BigInt!
itemType: Int!
zIndex: Int!
metadataURI: String!
equippableAddresses: [String!]!
equippableToAll: Boolean!
createAtBlock: BigInt!
transactionHash: String!
}