forumEvents.graphql 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. type CategoryCreatedEvent @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 @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 @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 @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 @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. # FIXME: Not emitted by the runtime
  98. # type ThreadUpdatedEvent @entity {
  99. # "Generic event data"
  100. # event: Event!
  101. # "The thread beeing updated"
  102. # thread: ForumThread!
  103. # "The new archival status of the thread (true = archived)"
  104. # newArchivalStatus: Boolean!
  105. # "Actor responsible for the update"
  106. # actor: Worker!
  107. # }
  108. type ThreadTitleUpdatedEvent @entity {
  109. ### GENERIC DATA ###
  110. "(network}-{blockNumber}-{indexInBlock}"
  111. id: ID!
  112. "Hash of the extrinsic which caused the event to be emitted"
  113. inExtrinsic: String
  114. "Blocknumber of the block in which the event was emitted."
  115. inBlock: Int!
  116. "Network the block was produced in"
  117. network: Network!
  118. "Index of event in block from which it was emitted."
  119. indexInBlock: Int!
  120. ### SPECIFIC DATA ###
  121. "The thread beeing updated"
  122. thread: ForumThread!
  123. "New title of the thread"
  124. newTitle: String!
  125. # Only author can update the thread title, so no actor information required
  126. }
  127. type ThreadDeletedEvent @entity {
  128. ### GENERIC DATA ###
  129. "(network}-{blockNumber}-{indexInBlock}"
  130. id: ID!
  131. "Hash of the extrinsic which caused the event to be emitted"
  132. inExtrinsic: String
  133. "Blocknumber of the block in which the event was emitted."
  134. inBlock: Int!
  135. "Network the block was produced in"
  136. network: Network!
  137. "Index of event in block from which it was emitted."
  138. indexInBlock: Int!
  139. ### SPECIFIC DATA ###
  140. "The thread beeing deleted"
  141. thread: ForumThread!
  142. # Only author can delete the thread, so no actor information required
  143. }
  144. type ThreadMovedEvent @entity {
  145. ### GENERIC DATA ###
  146. "(network}-{blockNumber}-{indexInBlock}"
  147. id: ID!
  148. "Hash of the extrinsic which caused the event to be emitted"
  149. inExtrinsic: String
  150. "Blocknumber of the block in which the event was emitted."
  151. inBlock: Int!
  152. "Network the block was produced in"
  153. network: Network!
  154. "Index of event in block from which it was emitted."
  155. indexInBlock: Int!
  156. ### SPECIFIC DATA ###
  157. "The thread beeing moved"
  158. thread: ForumThread!
  159. "Thread's previous category"
  160. oldCategory: ForumCategory!
  161. "Thread's new category"
  162. newCategory: ForumCategory!
  163. "The actor performing the transfer"
  164. actor: Worker!
  165. }
  166. type PostAddedEvent @entity {
  167. ### GENERIC DATA ###
  168. "(network}-{blockNumber}-{indexInBlock}"
  169. id: ID!
  170. "Hash of the extrinsic which caused the event to be emitted"
  171. inExtrinsic: String
  172. "Blocknumber of the block in which the event was emitted."
  173. inBlock: Int!
  174. "Network the block was produced in"
  175. network: Network!
  176. "Index of event in block from which it was emitted."
  177. indexInBlock: Int!
  178. ### SPECIFIC DATA ###
  179. "The post that was added"
  180. post: ForumPost!
  181. "Whether the added post is editable"
  182. isEditable: Boolean
  183. "Post's original text"
  184. text: String!
  185. }
  186. type PostModeratedEvent @entity {
  187. ### GENERIC DATA ###
  188. "(network}-{blockNumber}-{indexInBlock}"
  189. id: ID!
  190. "Hash of the extrinsic which caused the event to be emitted"
  191. inExtrinsic: String
  192. "Blocknumber of the block in which the event was emitted."
  193. inBlock: Int!
  194. "Network the block was produced in"
  195. network: Network!
  196. "Index of event in block from which it was emitted."
  197. indexInBlock: Int!
  198. ### SPECIFIC DATA ###
  199. "The post beeing moderated"
  200. post: ForumPost!
  201. "The rationale behind the moderation"
  202. rationale: String!
  203. "The actor responsible for the moderation"
  204. actor: Worker!
  205. }
  206. type PostDeletedEvent @entity {
  207. ### GENERIC DATA ###
  208. "(network}-{blockNumber}-{indexInBlock}"
  209. id: ID!
  210. "Hash of the extrinsic which caused the event to be emitted"
  211. inExtrinsic: String
  212. "Blocknumber of the block in which the event was emitted."
  213. inBlock: Int!
  214. "Network the block was produced in"
  215. network: Network!
  216. "Index of event in block from which it was emitted."
  217. indexInBlock: Int!
  218. ### SPECIFIC DATA ###
  219. "List of deleted posts"
  220. posts: [ForumPost!] @derivedFrom(field: "deletedInEvent")
  221. "The actor responsible for the removal"
  222. actor: Membership!
  223. "Posts deletion rationale"
  224. rationale: String!
  225. }
  226. type PostTextUpdatedEvent @entity {
  227. ### GENERIC DATA ###
  228. "(network}-{blockNumber}-{indexInBlock}"
  229. id: ID!
  230. "Hash of the extrinsic which caused the event to be emitted"
  231. inExtrinsic: String
  232. "Blocknumber of the block in which the event was emitted."
  233. inBlock: Int!
  234. "Network the block was produced in"
  235. network: Network!
  236. "Index of event in block from which it was emitted."
  237. indexInBlock: Int!
  238. ### SPECIFIC DATA ###
  239. "The post beeing updated"
  240. post: ForumPost!
  241. "New post text"
  242. newText: String!
  243. # Only author can edit the post, so no actor context required
  244. }
  245. type PostReactionResultCancel @variant {
  246. _phantom: Int
  247. }
  248. type PostReactionResultValid @variant {
  249. reaction: PostReaction!
  250. reactionId: Int!
  251. }
  252. type PostReactionResultInvalid @variant {
  253. reactionId: Int!
  254. }
  255. union PostReactionResult = PostReactionResultCancel | PostReactionResultValid | PostReactionResultInvalid
  256. type PostReactedEvent @entity {
  257. ### GENERIC DATA ###
  258. "(network}-{blockNumber}-{indexInBlock}"
  259. id: ID!
  260. "Hash of the extrinsic which caused the event to be emitted"
  261. inExtrinsic: String
  262. "Blocknumber of the block in which the event was emitted."
  263. inBlock: Int!
  264. "Network the block was produced in"
  265. network: Network!
  266. "Index of event in block from which it was emitted."
  267. indexInBlock: Int!
  268. ### SPECIFIC DATA ###
  269. "The post beeing reacted to"
  270. post: ForumPost!
  271. "The reaction result - new valid reaction, cancelation of previous reaction or invalid reaction (which also cancels the previous one)"
  272. reactionResult: PostReactionResult!
  273. "The member reacting to the post"
  274. reactingMember: Membership!
  275. }
  276. type VoteOnPollEvent @entity {
  277. ### GENERIC DATA ###
  278. "(network}-{blockNumber}-{indexInBlock}"
  279. id: ID!
  280. "Hash of the extrinsic which caused the event to be emitted"
  281. inExtrinsic: String
  282. "Blocknumber of the block in which the event was emitted."
  283. inBlock: Int!
  284. "Network the block was produced in"
  285. network: Network!
  286. "Index of event in block from which it was emitted."
  287. indexInBlock: Int!
  288. ### SPECIFIC DATA ###
  289. "Poll alternative beeing voted on"
  290. pollAlternative: ForumPollAlternative!
  291. "The member that casted the vote"
  292. votingMember: Membership!
  293. }
  294. type CategoryStickyThreadUpdateEvent @entity {
  295. ### GENERIC DATA ###
  296. "(network}-{blockNumber}-{indexInBlock}"
  297. id: ID!
  298. "Hash of the extrinsic which caused the event to be emitted"
  299. inExtrinsic: String
  300. "Blocknumber of the block in which the event was emitted."
  301. inBlock: Int!
  302. "Network the block was produced in"
  303. network: Network!
  304. "Index of event in block from which it was emitted."
  305. indexInBlock: Int!
  306. ### SPECIFIC DATA ###
  307. "The related category"
  308. category: ForumCategory!
  309. "List of the threads beeing made sticky"
  310. newStickyThreads: [ForumThread!]
  311. "The actor responsible for making the threads sticky"
  312. actor: Worker!
  313. }
  314. type CategoryMembershipOfModeratorUpdatedEvent @entity {
  315. ### GENERIC DATA ###
  316. "(network}-{blockNumber}-{indexInBlock}"
  317. id: ID!
  318. "Hash of the extrinsic which caused the event to be emitted"
  319. inExtrinsic: String
  320. "Blocknumber of the block in which the event was emitted."
  321. inBlock: Int!
  322. "Network the block was produced in"
  323. network: Network!
  324. "Index of event in block from which it was emitted."
  325. indexInBlock: Int!
  326. ### SPECIFIC DATA ###
  327. "The moderator in question"
  328. moderator: Worker!
  329. "The category in question"
  330. category: ForumCategory!
  331. "The flag indicating whether the permissions to moderate the category are granted or revoked"
  332. newCanModerateValue: Boolean!
  333. # Actor is always lead
  334. }