-
Notifications
You must be signed in to change notification settings - Fork 6
/
schema.graphql
32 lines (29 loc) · 942 Bytes
/
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
type UserAddress @entity {
"simply the address"
id: ID!
cryptopunks: [Cryptopunk!] @derivedFrom(field: "owner")
}
type TenancyDates @entity {
"getCryptopunkID(cryptopunkIDInBigInt) + '::' + event.transaction.hash.toHex() + '::' + event.logIndex.toHex()"
id: ID!
"timestamp as seconds since unix epoch."
start: Int!
"TODO: not computed right now. see GitHub. timestamp as seconds since unix epoch. end > start."
end: Int!
}
type Cryptopunk @entity {
"cryptopunk og id"
id: ID!
owner: UserAddress!
provenance: [Provenance!] @derivedFrom(field: "cryptopunk")
}
type Provenance @entity {
"cryptopunk id"
id: ID!
"same as above. graph does not allow to derive from id in Cryptopunk, thus redundancy."
cryptopunk: Cryptopunk!
tenant: UserAddress!
"impossible to make graph compute keccak256, so this here is for manual check on the client side."
minSalePriceInWei: String!
tenancyDates: TenancyDates!
}