-
Notifications
You must be signed in to change notification settings - Fork 19
/
schema.graphql
179 lines (169 loc) · 4.07 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
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!
"Total Following From owner Account"
totalFollowings: BigInt!
"List of followers Account"
followers: [Account!]!
"List of following Profiles"
followings: [Profile!]!
"List of comments"
comments: [Comment!] @derivedFrom(field: "fromProfile")
"List of post"
posts: [Post!] @derivedFrom(field: "fromProfile")
"List of Mirrors"
mirrors: [Mirror!] @derivedFrom(field: "fromProfile")
}
type Account @entity {
id: ID!
"Address"
address: Bytes!
"Default Profile"
defaultProfile: Profile
"List of Id profiles(String)"
profilesIds: [String!]!
"List of Profiles that own this account"
profiles: [Profile!] @derivedFrom(field: "owner")
"List of Followings Profiles"
following: [Profile!]!
"List of Following profiles"
totalFollowings: BigInt!
}
type Creator @entity {
id: ID!
"Address"
address: Bytes!
"Account Address is whitelisted"
isWhitelisted: Boolean!
"Date last modify Address"
lastUpdated: BigInt!
}
interface Publication @entity {
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 {
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 {
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 {
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 Follow @entity {
id: ID!
"Follower Account. "
fromAccount: Account
fromProfileSTR: String
"Array of profiles that are followed"
toProfile: [Profile!]
"Date from when the follow initiated"
timestamp: BigInt!
}
type FollowNFTTransferred @entity {
id: ID!
profileId: BigInt
followNFTID: BigInt
from: Bytes
to: Bytes
timestamp: BigInt
data: String
}