schema.graphql 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. # -----------------------------------------------
  2. # !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
  3. # !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
  4. # -----------------------------------------------
  5. type Admin {
  6. isKilled: Boolean!
  7. }
  8. type CategoryFeaturedVideos {
  9. categoryFeaturedVideos: [FeaturedVideo!]!
  10. categoryId: ID!
  11. }
  12. type ChannelFollowsInfo {
  13. follows: Int!
  14. id: ID!
  15. }
  16. type ChannelReportInfo {
  17. channelId: ID!
  18. createdAt: DateTime!
  19. id: ID!
  20. rationale: String!
  21. reporterIp: String!
  22. }
  23. enum ChannelReportOrderByInput {
  24. createdAt_ASC
  25. createdAt_DESC
  26. }
  27. input ChannelReportsWhereInput {
  28. channelId: ID
  29. createdAt_gt: DateTime
  30. createdAt_lt: DateTime
  31. reporterIp: String
  32. }
  33. """
  34. The javascript `Date` as string. Type represents date and time as the ISO Date string.
  35. """
  36. scalar DateTime
  37. type EntityViewsInfo {
  38. id: ID!
  39. views: Int!
  40. }
  41. type FeaturedVideo {
  42. videoCutUrl: String
  43. videoId: ID!
  44. }
  45. input FeaturedVideoInput {
  46. videoCutUrl: String
  47. videoId: ID!
  48. }
  49. type Mutation {
  50. """Add a single view to the target video's count"""
  51. addVideoView(categoryId: ID, channelId: ID!, videoId: ID!): EntityViewsInfo!
  52. """Add a single follow to the target channel"""
  53. followChannel(channelId: ID!): ChannelFollowsInfo!
  54. """Report a channel"""
  55. reportChannel(channelId: ID!, rationale: String!): ChannelReportInfo!
  56. """Report a video"""
  57. reportVideo(rationale: String!, videoId: ID!): VideoReportInfo!
  58. setCategoryFeaturedVideos(categoryId: ID!, videos: [FeaturedVideoInput!]!): [FeaturedVideo!]!
  59. setKillSwitch(isKilled: Boolean!): Admin!
  60. setVideoHero(newVideoHero: VideoHeroInput!): VideoHero!
  61. """Remove a single follow from the target channel"""
  62. unfollowChannel(channelId: ID!): ChannelFollowsInfo!
  63. }
  64. type Query {
  65. """Set killed instance"""
  66. admin: Admin!
  67. """Get featured videos for all categories"""
  68. allCategoriesFeaturedVideos(videosLimit: Int!): [CategoryFeaturedVideos!]!
  69. """Get featured videos for a given video category"""
  70. categoryFeaturedVideos(categoryId: ID!): [FeaturedVideo!]!
  71. """Get list of most viewed categories in a given time period"""
  72. mostViewedCategories(
  73. limit: Int
  74. """timePeriodDays must take one of the following values: 7, 30"""
  75. timePeriodDays: Int!
  76. ): [EntityViewsInfo!]
  77. """Get list of most viewed categories of all time"""
  78. mostViewedCategoriesAllTime(limit: Int!): [EntityViewsInfo!]
  79. reportedChannels(limit: Int = 30, orderBy: ChannelReportOrderByInput = createdAt_DESC, skip: Int, where: ChannelReportsWhereInput): [ChannelReportInfo!]!
  80. reportedVideos(limit: Int = 30, orderBy: VideoReportOrderByInput = createdAt_DESC, skip: Int, where: VideoReportsWhereInput): [VideoReportInfo!]!
  81. """Get current video hero"""
  82. videoHero: VideoHero!
  83. }
  84. type VideoHero {
  85. heroPosterUrl: String!
  86. heroTitle: String!
  87. heroVideoCutUrl: String!
  88. videoId: ID!
  89. }
  90. input VideoHeroInput {
  91. heroPosterUrl: String!
  92. heroTitle: String!
  93. heroVideoCutUrl: String!
  94. videoId: ID!
  95. }
  96. type VideoReportInfo {
  97. createdAt: DateTime!
  98. id: ID!
  99. rationale: String!
  100. reporterIp: String!
  101. videoId: ID!
  102. }
  103. enum VideoReportOrderByInput {
  104. createdAt_ASC
  105. createdAt_DESC
  106. }
  107. input VideoReportsWhereInput {
  108. createdAt_gt: DateTime
  109. createdAt_lt: DateTime
  110. reporterIp: String
  111. videoId: ID
  112. }