forked from pancakeswap/pancake-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.graphql
55 lines (40 loc) · 1016 Bytes
/
profile.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
type Team @entity {
id: ID!
name: String!
isJoinable: Boolean!
# Block number when the team was created.
block: BigInt!
timestamp: BigInt!
# Users
totalUsers: BigInt!
users: [User!]! @derivedFrom(field: "team")
# Points with campaignId
totalPoints: BigInt!
points: [Point!]! @derivedFrom(field: "team")
}
type User @entity {
id: ID! # address
isActive: Boolean!
createdAt: BigInt!
updatedAt: BigInt!
# Block number when the user was created.
block: BigInt!
# Team
team: Team!
# Points with campaignId
totalPoints: BigInt!
points: [Point!]! @derivedFrom(field: "user")
}
type Point @entity {
id: ID! # address/teamId + campaignId
# Use optionnal dependecy to avoid having to `.concat` each point(s).
team: Team
user: User
points: BigInt!
campaignId: BigInt!
# Transaction
hash: Bytes!
# Block number when the point was triggered.
block: BigInt!
timestamp: BigInt!
}