content.graphql 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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. videos: [Video!]! @derivedFrom(field: "channel")
  42. createdInBlock: Int!
  43. }
  44. type CuratorGroup @entity {
  45. "Runtime identifier"
  46. id: ID!
  47. "Curators belonging to this group"
  48. curatorIds: [Int!]!
  49. "Is group active or not"
  50. isActive: Boolean!
  51. channels: [Channel!]! @derivedFrom(field: "ownerCuratorGroup")
  52. }
  53. type VideoCategory @entity {
  54. "Runtime identifier"
  55. id: ID!
  56. "The name of the category"
  57. name: String @fulltext(query: "videoCategoriesByName")
  58. videos: [Video!]! @derivedFrom(field: "category")
  59. createdInBlock: Int!
  60. }
  61. type Video @entity {
  62. "Runtime identifier"
  63. id: ID!
  64. "Reference to member's channel"
  65. channel: Channel!
  66. "Reference to a video category"
  67. category: VideoCategory
  68. "The title of the video"
  69. title: String @fulltext(query: "search")
  70. "The description of the Video"
  71. description: String
  72. "Video duration in seconds"
  73. duration: Int
  74. "Video thumbnail asset (recommended ratio: 16:9)"
  75. thumbnailPhoto: StorageDataObject
  76. ##########################
  77. "Video's main langauge"
  78. language: Language
  79. "Whether or not Video contains marketing"
  80. hasMarketing: Boolean
  81. "If the Video was published on other platform before beeing published on Joystream - the original publication date"
  82. publishedBeforeJoystream: DateTime
  83. "Whether the Video is supposed to be publically displayed"
  84. isPublic: Boolean
  85. "Flag signaling whether a video is censored."
  86. isCensored: Boolean!
  87. "Whether the Video contains explicit material."
  88. isExplicit: Boolean
  89. "License under the video is published"
  90. license: License
  91. "Video media asset"
  92. media: StorageDataObject
  93. ##########################
  94. "Video file metadata"
  95. mediaMetadata: VideoMediaMetadata
  96. createdInBlock: Int!
  97. "Is video featured or not"
  98. isFeatured: Boolean!
  99. }
  100. type VideoMediaMetadata @entity {
  101. "Unique identifier"
  102. id: ID!
  103. "Encoding of the video media object"
  104. encoding: VideoMediaEncoding
  105. "Video media width in pixels"
  106. pixelWidth: Int
  107. "Video media height in pixels"
  108. pixelHeight: Int
  109. "Video media size in bytes"
  110. size: BigInt
  111. video: Video @derivedFrom(field: "mediaMetadata")
  112. createdInBlock: Int!
  113. }
  114. type VideoMediaEncoding @entity {
  115. "Encoding of the video media object"
  116. codecName: String
  117. "Media container format"
  118. container: String
  119. "Content MIME type"
  120. mimeMediaType: String
  121. }
  122. type License @entity {
  123. "Unique identifier"
  124. id: ID!
  125. "License code defined by Joystream"
  126. code: Int
  127. "Attribution (if required by the license)"
  128. attribution: String
  129. "Custom license content"
  130. custom_text: String
  131. }