schema.graphql 2.5 KB

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