forumEvents.graphql 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. type CategoryCreatedEvent implements Event @entity {
  2. ### GENERIC DATA ###
  3. "(network}-{blockNumber}-{indexInBlock}"
  4. id: ID!
  5. "Hash of the extrinsic which caused the event to be emitted"
  6. inExtrinsic: String
  7. "Blocknumber of the block in which the event was emitted."
  8. inBlock: Int!
  9. "Network the block was produced in"
  10. network: Network!
  11. "Index of event in block from which it was emitted."
  12. indexInBlock: Int!
  13. ### SPECIFIC DATA ###
  14. "The created category"
  15. category: ForumCategory!
  16. # The actor is always lead
  17. }
  18. type CategoryArchivalStatusUpdatedEvent implements Event @entity {
  19. ### GENERIC DATA ###
  20. "(network}-{blockNumber}-{indexInBlock}"
  21. id: ID!
  22. "Hash of the extrinsic which caused the event to be emitted"
  23. inExtrinsic: String
  24. "Blocknumber of the block in which the event was emitted."
  25. inBlock: Int!
  26. "Network the block was produced in"
  27. network: Network!
  28. "Index of event in block from which it was emitted."
  29. indexInBlock: Int!
  30. ### SPECIFIC DATA ###
  31. "The category beeing updated"
  32. category: ForumCategory!
  33. "The new archival status of the category (true = archived)"
  34. newArchivalStatus: Boolean!
  35. "The moderator (possibly lead) responsible for updating the category"
  36. actor: Worker!
  37. }
  38. type CategoryDeletedEvent implements Event @entity {
  39. ### GENERIC DATA ###
  40. "(network}-{blockNumber}-{indexInBlock}"
  41. id: ID!
  42. "Hash of the extrinsic which caused the event to be emitted"
  43. inExtrinsic: String
  44. "Blocknumber of the block in which the event was emitted."
  45. inBlock: Int!
  46. "Network the block was produced in"
  47. network: Network!
  48. "Index of event in block from which it was emitted."
  49. indexInBlock: Int!
  50. ### SPECIFIC DATA ###
  51. "Category beeing deleted"
  52. category: ForumCategory!
  53. "The moderator (possibly lead) responsible for deleting the category"
  54. actor: Worker!
  55. }
  56. type ThreadCreatedEvent implements Event @entity {
  57. ### GENERIC DATA ###
  58. "(network}-{blockNumber}-{indexInBlock}"
  59. id: ID!
  60. "Hash of the extrinsic which caused the event to be emitted"
  61. inExtrinsic: String
  62. "Blocknumber of the block in which the event was emitted."
  63. inBlock: Int!
  64. "Network the block was produced in"
  65. network: Network!
  66. "Index of event in block from which it was emitted."
  67. indexInBlock: Int!
  68. ### SPECIFIC DATA ###
  69. "The thread that was created"
  70. thread: ForumThread!
  71. "Thread's original title"
  72. title: String!
  73. "Thread's original text"
  74. text: String!
  75. # The author is already part of the Thread entity itself and is immutable
  76. }
  77. type ThreadModeratedEvent implements Event @entity {
  78. ### GENERIC DATA ###
  79. "(network}-{blockNumber}-{indexInBlock}"
  80. id: ID!
  81. "Hash of the extrinsic which caused the event to be emitted"
  82. inExtrinsic: String
  83. "Blocknumber of the block in which the event was emitted."
  84. inBlock: Int!
  85. "Network the block was produced in"
  86. network: Network!
  87. "Index of event in block from which it was emitted."
  88. indexInBlock: Int!
  89. ### SPECIFIC DATA ###
  90. "The thread beeing moderated"
  91. thread: ForumThread!
  92. "Rationale behind the moderation"
  93. rationale: String!
  94. "Actor responsible for the moderation"
  95. actor: Worker!
  96. }
  97. type ThreadMetadataUpdatedEvent implements Event @entity {
  98. ### GENERIC DATA ###
  99. "(network}-{blockNumber}-{indexInBlock}"
  100. id: ID!
  101. "Hash of the extrinsic which caused the event to be emitted"
  102. inExtrinsic: String
  103. "Blocknumber of the block in which the event was emitted."
  104. inBlock: Int!
  105. "Network the block was produced in"
  106. network: Network!
  107. "Index of event in block from which it was emitted."
  108. indexInBlock: Int!
  109. ### SPECIFIC DATA ###
  110. "The thread beeing updated"
  111. thread: ForumThread!
  112. "New title of the thread"
  113. newTitle: String
  114. # Only author can update the thread title, so no actor information required
  115. }
  116. type ThreadDeletedEvent implements Event @entity {
  117. ### GENERIC DATA ###
  118. "(network}-{blockNumber}-{indexInBlock}"
  119. id: ID!
  120. "Hash of the extrinsic which caused the event to be emitted"
  121. inExtrinsic: String
  122. "Blocknumber of the block in which the event was emitted."
  123. inBlock: Int!
  124. "Network the block was produced in"
  125. network: Network!
  126. "Index of event in block from which it was emitted."
  127. indexInBlock: Int!
  128. ### SPECIFIC DATA ###
  129. "The thread beeing deleted"
  130. thread: ForumThread!
  131. # Only author can delete the thread, so no actor information required
  132. }
  133. type ThreadMovedEvent implements Event @entity {
  134. ### GENERIC DATA ###
  135. "(network}-{blockNumber}-{indexInBlock}"
  136. id: ID!
  137. "Hash of the extrinsic which caused the event to be emitted"
  138. inExtrinsic: String
  139. "Blocknumber of the block in which the event was emitted."
  140. inBlock: Int!
  141. "Network the block was produced in"
  142. network: Network!
  143. "Index of event in block from which it was emitted."
  144. indexInBlock: Int!
  145. ### SPECIFIC DATA ###
  146. "The thread beeing moved"
  147. thread: ForumThread!
  148. "Thread's previous category"
  149. oldCategory: ForumCategory!
  150. "Thread's new category"
  151. newCategory: ForumCategory!
  152. "The actor performing the transfer"
  153. actor: Worker!
  154. }
  155. type PostAddedEvent implements Event @entity {
  156. ### GENERIC DATA ###
  157. "(network}-{blockNumber}-{indexInBlock}"
  158. id: ID!
  159. "Hash of the extrinsic which caused the event to be emitted"
  160. inExtrinsic: String
  161. "Blocknumber of the block in which the event was emitted."
  162. inBlock: Int!
  163. "Network the block was produced in"
  164. network: Network!
  165. "Index of event in block from which it was emitted."
  166. indexInBlock: Int!
  167. ### SPECIFIC DATA ###
  168. "The post that was added"
  169. post: ForumPost!
  170. "Whether the added post is editable"
  171. isEditable: Boolean
  172. "Post's original text"
  173. text: String!
  174. }
  175. type PostModeratedEvent implements Event @entity {
  176. ### GENERIC DATA ###
  177. "(network}-{blockNumber}-{indexInBlock}"
  178. id: ID!
  179. "Hash of the extrinsic which caused the event to be emitted"
  180. inExtrinsic: String
  181. "Blocknumber of the block in which the event was emitted."
  182. inBlock: Int!
  183. "Network the block was produced in"
  184. network: Network!
  185. "Index of event in block from which it was emitted."
  186. indexInBlock: Int!
  187. ### SPECIFIC DATA ###
  188. "The post beeing moderated"
  189. post: ForumPost!
  190. "The rationale behind the moderation"
  191. rationale: String!
  192. "The actor responsible for the moderation"
  193. actor: Worker!
  194. }
  195. type PostDeletedEvent implements Event @entity {
  196. ### GENERIC DATA ###
  197. "(network}-{blockNumber}-{indexInBlock}"
  198. id: ID!
  199. "Hash of the extrinsic which caused the event to be emitted"
  200. inExtrinsic: String
  201. "Blocknumber of the block in which the event was emitted."
  202. inBlock: Int!
  203. "Network the block was produced in"
  204. network: Network!
  205. "Index of event in block from which it was emitted."
  206. indexInBlock: Int!
  207. ### SPECIFIC DATA ###
  208. "List of deleted posts"
  209. posts: [ForumPost!] @derivedFrom(field: "deletedInEvent")
  210. "The actor responsible for the removal"
  211. actor: Membership!
  212. "Posts deletion rationale"
  213. rationale: String!
  214. }
  215. type PostTextUpdatedEvent implements Event @entity {
  216. ### GENERIC DATA ###
  217. "(network}-{blockNumber}-{indexInBlock}"
  218. id: ID!
  219. "Hash of the extrinsic which caused the event to be emitted"
  220. inExtrinsic: String
  221. "Blocknumber of the block in which the event was emitted."
  222. inBlock: Int!
  223. "Network the block was produced in"
  224. network: Network!
  225. "Index of event in block from which it was emitted."
  226. indexInBlock: Int!
  227. ### SPECIFIC DATA ###
  228. "The post beeing updated"
  229. post: ForumPost!
  230. "New post text"
  231. newText: String!
  232. # Only author can edit the post, so no actor context required
  233. }
  234. type PostReactionResultCancel @variant {
  235. _phantom: Int
  236. }
  237. type PostReactionResultValid @variant {
  238. reaction: PostReaction!
  239. reactionId: Int!
  240. }
  241. type PostReactionResultInvalid @variant {
  242. reactionId: String!
  243. }
  244. union PostReactionResult = PostReactionResultCancel | PostReactionResultValid | PostReactionResultInvalid
  245. type PostReactedEvent implements Event @entity {
  246. ### GENERIC DATA ###
  247. "(network}-{blockNumber}-{indexInBlock}"
  248. id: ID!
  249. "Hash of the extrinsic which caused the event to be emitted"
  250. inExtrinsic: String
  251. "Blocknumber of the block in which the event was emitted."
  252. inBlock: Int!
  253. "Network the block was produced in"
  254. network: Network!
  255. "Index of event in block from which it was emitted."
  256. indexInBlock: Int!
  257. ### SPECIFIC DATA ###
  258. "The post beeing reacted to"
  259. post: ForumPost!
  260. "The reaction result - new valid reaction, cancelation of previous reaction or invalid reaction (which also cancels the previous one)"
  261. reactionResult: PostReactionResult!
  262. "The member reacting to the post"
  263. reactingMember: Membership!
  264. }
  265. type VoteOnPollEvent implements Event @entity {
  266. ### GENERIC DATA ###
  267. "(network}-{blockNumber}-{indexInBlock}"
  268. id: ID!
  269. "Hash of the extrinsic which caused the event to be emitted"
  270. inExtrinsic: String
  271. "Blocknumber of the block in which the event was emitted."
  272. inBlock: Int!
  273. "Network the block was produced in"
  274. network: Network!
  275. "Index of event in block from which it was emitted."
  276. indexInBlock: Int!
  277. ### SPECIFIC DATA ###
  278. "Poll alternative beeing voted on"
  279. pollAlternative: ForumPollAlternative!
  280. "The member that casted the vote"
  281. votingMember: Membership!
  282. }
  283. type CategoryStickyThreadUpdateEvent implements Event @entity {
  284. ### GENERIC DATA ###
  285. "(network}-{blockNumber}-{indexInBlock}"
  286. id: ID!
  287. "Hash of the extrinsic which caused the event to be emitted"
  288. inExtrinsic: String
  289. "Blocknumber of the block in which the event was emitted."
  290. inBlock: Int!
  291. "Network the block was produced in"
  292. network: Network!
  293. "Index of event in block from which it was emitted."
  294. indexInBlock: Int!
  295. ### SPECIFIC DATA ###
  296. "The related category"
  297. category: ForumCategory!
  298. "List of the threads beeing made sticky"
  299. newStickyThreads: [ForumThread!]
  300. "The actor responsible for making the threads sticky"
  301. actor: Worker!
  302. }
  303. type CategoryMembershipOfModeratorUpdatedEvent implements Event @entity {
  304. ### GENERIC DATA ###
  305. "(network}-{blockNumber}-{indexInBlock}"
  306. id: ID!
  307. "Hash of the extrinsic which caused the event to be emitted"
  308. inExtrinsic: String
  309. "Blocknumber of the block in which the event was emitted."
  310. inBlock: Int!
  311. "Network the block was produced in"
  312. network: Network!
  313. "Index of event in block from which it was emitted."
  314. indexInBlock: Int!
  315. ### SPECIFIC DATA ###
  316. "The moderator in question"
  317. moderator: Worker!
  318. "The category in question"
  319. category: ForumCategory!
  320. "The flag indicating whether the permissions to moderate the category are granted or revoked"
  321. newCanModerateValue: Boolean!
  322. # Actor is always lead
  323. }