-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
142 lines (134 loc) · 3.23 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
type Stat @entity {
id: ID!
"Total profiles"
totalProfiles: BigInt!
"Total accounts"
totalAccounts: BigInt!
"Total Post"
totalPosts: BigInt!
"Total Comments"
totalComments: BigInt!
"Total Mirrors"
totalMirror: BigInt!
"Total Publicactions"
totalPublications: BigInt!
"Last Comment created"
lastCommentCreatedAt: BigInt
"Last Post created"
lastPostCreatedAt: BigInt
"Last Mirror created"
lastMirrorCreatedAt: BigInt
"Last Profile created"
lastProfileCreated: BigInt
}
type Profile @entity {
id: ID!
"Number of profile"
profileId: BigInt!
"Address from the creator profile"
creator: Creator!
"Address from the owner creator profile"
owner: Account!
"User attempting to follow the profile should be issued a Follow NFT"
followNFT: Bytes
"IPFS has the follow data"
followNFTURI: String # string
"Nickname of the profile"
handle: String # string
"URI image of the profile"
imageURI: String # string
"Date created profile"
createdAt: BigInt
"Follow Module Address"
followModule: Bytes
"Follow Module Return Data"
followModuleReturnData: Bytes
"Dispatcher address allowed to post, comment, mirror, set follow module and change the profile picture on behalf of the owner."
dispatcher: Bytes
"Last Date modify profile"
lastUpdated: BigInt!
"Total mirrors"
totalMirrors: BigInt!
"Total posts"
totalPosts: BigInt!
"Total comments"
totalComments: BigInt!
"Total Followers"
totalFollowers: BigInt!
}
type Account @entity {
id: ID!
"Address"
address: Bytes!
"List of Profiles that own this account"
profiles: [Profile!]! @derivedFrom(field: "owner")
}
type Creator @entity {
id: ID!
"Address"
address: Bytes!
"Account Address is whitelisted"
isWhitelisted: Boolean!
"Date last modify Address"
lastUpdated: BigInt!
}
interface Publication @entity(immutable: true) {
id: ID!
"Profile that created the publication"
fromProfile: Profile!
"Publication Id"
pubId: BigInt!
referenceModule: Bytes!
referenceModuleReturnData: Bytes
"Date of creation"
timestamp: BigInt!
}
type Post implements Publication @entity(immutable: true) {
id: ID!
"Profile that created the post"
fromProfile: Profile!
"Publication Id"
pubId: BigInt!
referenceModule: Bytes!
referenceModuleReturnData: Bytes
"URI of the post content"
contentURI: String!
collectModule: Bytes!
collectModuleReturnData: Bytes
"Date of creation"
timestamp: BigInt!
}
type Mirror implements Publication @entity(immutable: true) {
id: ID!
"Profile that created the post"
fromProfile: Profile!
"Publication Id"
pubId: BigInt!
referenceModule: Bytes!
referenceModuleReturnData: Bytes
profileIdPointed: BigInt!
pubIdPointed: BigInt!
"Date of creation"
timestamp: BigInt!
}
type Comment implements Publication @entity(immutable: true) {
id: ID!
"Profile that created the post"
fromProfile: Profile!
"Publication Id"
pubId: BigInt!
referenceModule: Bytes!
referenceModuleReturnData: Bytes
"URI of the post content"
contentURI: String!
profileIdPointed: BigInt!
pubIdPointed: BigInt!
collectModule: Bytes
collectModuleReturnData: Bytes
"Date of creation"
timestamp: BigInt!
}
type SocialGraph @entity {
id: ID! # address
following: [Profile!]!
}