videoComments.graphql 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. type CommentReaction @entity {
  2. "{memberId}-{commentId}-{reactionId}"
  3. id: ID!
  4. "The Reaction id"
  5. reactionId: Int!
  6. "The member that reacted"
  7. member: Membership!
  8. "The comment that has been reacted to"
  9. comment: Comment!
  10. # Added to efficiently delete all reactions of all
  11. # (deleted) comments once video has been deleted.
  12. "The video the comment (that has been reacted) exists"
  13. video: Video!
  14. }
  15. enum CommentStatus {
  16. VISIBLE
  17. DELETED
  18. MODERATED
  19. }
  20. type CommentReactionsCountByReactionId {
  21. "The reaction id"
  22. reactionId: Int!
  23. "No of times the comment has been reacted with given reaction Id"
  24. count: Int!
  25. }
  26. type Comment @entity {
  27. "METAPROTOCOL-{network}-{blockNumber}-{indexInBlock}"
  28. id: ID!
  29. "Timestamp of the block the comment was created at"
  30. createdAt: DateTime!
  31. "Author of the video comment"
  32. author: Membership!
  33. "Comment text"
  34. text: String!
  35. "Video the comment was added to"
  36. video: Video!
  37. "Status of the comment; either it is visible, deleted, or moderated (deleted by moderator)"
  38. status: CommentStatus! @index
  39. "List of all reactions to the comment"
  40. reactions: [CommentReaction!] @derivedFrom(field: "comment")
  41. "Reactions count by reaction Id"
  42. reactionsCountByReactionId: [CommentReactionsCountByReactionId!]
  43. "A (parent) comment that this comment replies to (if any)"
  44. parentComment: Comment
  45. "How many comments has replied to this comment"
  46. repliesCount: Int!
  47. "Total number of reactions to this comment"
  48. reactionsCount: Int!
  49. "Sum of replies and reactions"
  50. reactionsAndRepliesCount: Int!
  51. "Whether comment has been edited or not"
  52. isEdited: Boolean!
  53. "Whether a comment has been excluded/hidden (by the gateway operator)"
  54. isExcluded: Boolean!
  55. }