content.graphql 4.1 KB

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