content.graphql 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. "Category of media channel"
  2. type ChannelCategory @entity {
  3. id: ID!
  4. "The name of the category"
  5. name: String @fulltext(query: "channelCategoriesByName")
  6. channels: [Channel!]! @derivedFrom(field: "category")
  7. createdInBlock: Int!
  8. }
  9. type Language @entity {
  10. "Runtime entity identifier (EntityId)"
  11. id: ID!
  12. "Language identifier ISO 639-1"
  13. iso: String!
  14. createdInBlock: Int!
  15. }
  16. type Channel @entity {
  17. "Runtime entity identifier (EntityId)"
  18. id: ID!
  19. "Member owning the channel (if any)"
  20. ownerMember: Membership
  21. "Curator group owning the channel (if any)"
  22. ownerCuratorGroup: CuratorGroup
  23. category: ChannelCategory
  24. "Reward account where revenue is sent if set."
  25. rewardAccount: String
  26. "The title of the Channel"
  27. title: String @fulltext(query: "search")
  28. "The description of a Channel"
  29. description: String
  30. "Channel's cover (background) photo asset. Recommended ratio: 16:9."
  31. coverPhoto: StorageDataObject
  32. "Channel's avatar photo asset."
  33. avatarPhoto: StorageDataObject
  34. ##########################
  35. "Flag signaling whether a channel is public."
  36. isPublic: Boolean
  37. "Flag signaling whether a channel is censored."
  38. isCensored: Boolean!
  39. "The primary langauge of the channel's content"
  40. language: Language
  41. "List of videos that belong to the channel"
  42. videos: [Video!]! @derivedFrom(field: "channel")
  43. "Number of the block the channel was created in"
  44. createdInBlock: Int!
  45. "List of channel collaborators (members)"
  46. collaborators: [Membership!]
  47. }
  48. type CuratorGroup @entity {
  49. "Runtime identifier"
  50. id: ID!
  51. "Curators belonging to this group"
  52. curatorIds: [Int!]!
  53. "Is group active or not"
  54. isActive: Boolean!
  55. channels: [Channel!]! @derivedFrom(field: "ownerCuratorGroup")
  56. }
  57. type VideoCategory @entity {
  58. "Runtime identifier"
  59. id: ID!
  60. "The name of the category"
  61. name: String @fulltext(query: "videoCategoriesByName")
  62. videos: [Video!]! @derivedFrom(field: "category")
  63. createdInBlock: Int!
  64. }
  65. type Video @entity {
  66. "Runtime identifier"
  67. id: ID!
  68. "Reference to member's channel"
  69. channel: Channel!
  70. "Reference to a video category"
  71. category: VideoCategory
  72. "The title of the video"
  73. title: String @fulltext(query: "search")
  74. "The description of the Video"
  75. description: String
  76. "Video duration in seconds"
  77. duration: Int
  78. "Video thumbnail asset (recommended ratio: 16:9)"
  79. thumbnailPhoto: StorageDataObject
  80. ##########################
  81. "Video's main langauge"
  82. language: Language
  83. "Whether or not Video contains marketing"
  84. hasMarketing: Boolean
  85. "If the Video was published on other platform before beeing published on Joystream - the original publication date"
  86. publishedBeforeJoystream: DateTime
  87. "Whether the Video is supposed to be publically displayed"
  88. isPublic: Boolean
  89. "Flag signaling whether a video is censored."
  90. isCensored: Boolean!
  91. "Whether the Video contains explicit material."
  92. isExplicit: Boolean
  93. "License under the video is published"
  94. license: License
  95. "Video media asset"
  96. media: StorageDataObject
  97. ##########################
  98. "Video file metadata"
  99. mediaMetadata: VideoMediaMetadata
  100. createdInBlock: Int!
  101. "Is video featured or not"
  102. isFeatured: Boolean!
  103. }
  104. type VideoMediaMetadata @entity {
  105. "Unique identifier"
  106. id: ID!
  107. "Encoding of the video media object"
  108. encoding: VideoMediaEncoding
  109. "Video media width in pixels"
  110. pixelWidth: Int
  111. "Video media height in pixels"
  112. pixelHeight: Int
  113. "Video media size in bytes"
  114. size: BigInt
  115. video: Video @derivedFrom(field: "mediaMetadata")
  116. createdInBlock: Int!
  117. }
  118. type VideoMediaEncoding @entity {
  119. "Encoding of the video media object"
  120. codecName: String
  121. "Media container format"
  122. container: String
  123. "Content MIME type"
  124. mimeMediaType: String
  125. }
  126. type License @entity {
  127. "Unique identifier"
  128. id: ID!
  129. "License code defined by Joystream"
  130. code: Int
  131. "Attribution (if required by the license)"
  132. attribution: String
  133. "Custom license content"
  134. custom_text: String
  135. }