-
Notifications
You must be signed in to change notification settings - Fork 17
/
schema.graphql
99 lines (71 loc) · 2.04 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
type contract @entity {
id: ID!
asERC721: collection
}
type account @entity {
" the wallet address "
id: ID!
" The NFTs owned by this account "
tokens: [token!]! @derivedFrom(field: "owner")
" The transfers originating from this account "
transfersFrom: [transfer!]! @derivedFrom(field: "senderAddress")
" The transfers recevied by this account"
transfersTo: [transfer!]! @derivedFrom(field: "receiverAddress")
" M:M relationship for Accounts and Collections "
holdings: [holding!]! @derivedFrom(field: "account")
}
"replaces TokenRegistry"
type collection @entity {
" The address of the collection "
id: ID!
" The name of the collection "
name: String
" The symbol for the collection "
symbol: String
" Total Supply of Tokens "
totalSupply: BigInt
" Tokens for the collection"
tokens: [token!]! @derivedFrom(field: "collection")
" M:M relationship for Accounts and Collections "
holdings: [holding!]! @derivedFrom(field: "collection")
}
type token @entity {
" Ethereum / Collection Addrress - Token Id "
id: ID!
" The collection address "
collection: collection!
" The id of the NFT"
identifier: BigInt!
" The address the currently owns the token "
owner: account
" Transfers involving this token "
transfers: [transfer!]! @derivedFrom(field: "token")
}
type holding @entity {
" Account Id - Collection Id "
id: ID!
" Address of the account "
account: account
" Address of the NFT Collection "
collection: collection
" Count of NFT's owned in a collection by the Address"
tokenCount: Int!
}
type transfer @entity {
" Block Number and Event Id in which the transfers event occured"
id: ID!
" Transaction hash in which the transfer event occured"
transaction: Bytes!
" The collection address "
collection: collection!
" The collection addrress - The token id "
token: token!
" The sender address "
senderAddress: account
" The receiver address "
receiverAddress: account
" Timestamp for block "
timestamp: Int!
" Block Number "
blockNumber: Int!
}