schema.graphql 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. """
  17. The javascript `Date` as string. Type represents date and time as the ISO Date string.
  18. """
  19. scalar DateTime
  20. type EntityViewsInfo {
  21. id: ID!
  22. views: Int!
  23. }
  24. type FeaturedVideo {
  25. videoCutUrl: String
  26. videoId: ID!
  27. }
  28. input FeaturedVideoInput {
  29. videoCutUrl: String
  30. videoId: ID!
  31. }
  32. type Mutation {
  33. """Add a single view to the target video's count"""
  34. addVideoView(categoryId: ID, channelId: ID!, videoId: ID!): EntityViewsInfo!
  35. """Add a single follow to the target channel"""
  36. followChannel(channelId: ID!): ChannelFollowsInfo!
  37. """Report a video"""
  38. reportVideo(rationale: String!, videoId: ID!): ReportVideoInfo!
  39. setCategoryFeaturedVideos(categoryId: ID!, videos: [FeaturedVideoInput!]!): [FeaturedVideo!]!
  40. setKillSwitch(isKilled: Boolean!): Admin!
  41. setVideoHero(newVideoHero: VideoHeroInput!): VideoHero!
  42. """Remove a single follow from the target channel"""
  43. unfollowChannel(channelId: ID!): ChannelFollowsInfo!
  44. }
  45. type Query {
  46. """Set killed instance"""
  47. admin: Admin!
  48. """Get featured videos for all categories"""
  49. allCategoriesFeaturedVideos(videosLimit: Int!): [CategoryFeaturedVideos!]!
  50. """Get featured videos for a given video category"""
  51. categoryFeaturedVideos(categoryId: ID!): [FeaturedVideo!]!
  52. """Get list of most viewed categories in a given time period"""
  53. mostViewedCategories(
  54. limit: Int
  55. """timePeriodDays must take one of the following values: 7, 30"""
  56. timePeriodDays: Int!
  57. ): [EntityViewsInfo!]
  58. """Get list of most viewed categories of all time"""
  59. mostViewedCategoriesAllTime(limit: Int!): [EntityViewsInfo!]
  60. reportedVideos(limit: Int = 30, orderBy: VideoReportOrderByInput = createdAt_DESC, skip: Int, where: VideoReportWhereInput): [ReportVideoInfo!]!
  61. """Get current video hero"""
  62. videoHero: VideoHero!
  63. }
  64. type ReportVideoInfo {
  65. createdAt: DateTime!
  66. id: ID!
  67. rationale: String!
  68. reporterIp: String!
  69. videoId: ID!
  70. }
  71. type VideoHero {
  72. heroPosterUrl: String!
  73. heroTitle: String!
  74. heroVideoCutUrl: String!
  75. videoId: ID!
  76. }
  77. input VideoHeroInput {
  78. heroPosterUrl: String!
  79. heroTitle: String!
  80. heroVideoCutUrl: String!
  81. videoId: ID!
  82. }
  83. enum VideoReportOrderByInput {
  84. createdAt_ASC
  85. createdAt_DESC
  86. }
  87. input VideoReportWhereInput {
  88. createdAt_gt: DateTime
  89. createdAt_lt: DateTime
  90. reporterIp: String
  91. videoId: ID
  92. }