queryNodeSchemaExtension.graphql 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. extend type VideoHero {
  2. video: Video!
  3. }
  4. extend type FeaturedVideo {
  5. video: Video!
  6. }
  7. extend type CategoryFeaturedVideos {
  8. category: VideoCategory!
  9. }
  10. extend type Video {
  11. views: Int!
  12. }
  13. extend type Channel {
  14. views: Int!
  15. follows: Int!
  16. }
  17. type Query {
  18. # ===== Videos =====
  19. """
  20. Get list of 10 most watched videos in last week
  21. """
  22. top10VideosThisWeek(where: VideoWhereInput): [Video!]!
  23. """
  24. Get list of 10 most watched videos in last month
  25. """
  26. top10VideosThisMonth(where: VideoWhereInput): [Video!]!
  27. """
  28. Get connection of most viewed videos in a given period or of all time
  29. """
  30. mostViewedVideosConnection(
  31. """
  32. `periodDays` indicates from which time period the views should be taken from. Can be 7 or 30.
  33. If not provided, views from all time will be used.
  34. """
  35. periodDays: Int
  36. """
  37. `limit` indicates on how many videos the connection should be capped.
  38. """
  39. limit: Int!
  40. first: Int
  41. after: String
  42. last: Int
  43. before: String
  44. where: VideoWhereInput
  45. orderBy: [VideoOrderByInput!]
  46. ): VideoConnection!
  47. # ===== Channels =====
  48. """
  49. Get list of 15 most followed channels out of 100 newest channels in random order
  50. """
  51. discoverChannels(where: ChannelWhereInput): [Channel!]!
  52. """
  53. Get list of 15 most watched channels out of 100 newest channels in random order
  54. """
  55. promisingChannels(where: ChannelWhereInput): [Channel!]!
  56. """
  57. Get list of 15 most watched channels in random order
  58. """
  59. popularChannels(where: ChannelWhereInput): [Channel!]!
  60. """
  61. Get list of 10 most followed channels of all time
  62. """
  63. top10Channels(where: ChannelWhereInput): [Channel!]!
  64. """
  65. Get connection of most followed channels in a given period or of all time
  66. """
  67. mostFollowedChannelsConnection(
  68. """
  69. `periodDays` indicates from which time period the follows should be taken from. Can be 7 or 30.
  70. If not provided, follows from all time will be used.
  71. """
  72. periodDays: Int
  73. """
  74. `limit` indicates on how many channels the connection should be capped.
  75. """
  76. limit: Int!
  77. first: Int
  78. after: String
  79. last: Int
  80. before: String
  81. where: ChannelWhereInput
  82. orderBy: [ChannelOrderByInput!]
  83. ): ChannelConnection!
  84. """
  85. Get connection of most viewed channels in a given period or of all time
  86. """
  87. mostViewedChannelsConnection(
  88. """
  89. `periodDays` indicates from which time period the views should be taken from. Can be 7 or 30.
  90. If not provided, views from all time will be used.
  91. """
  92. periodDays: Int
  93. """
  94. `limit` indicates on how many channels the connection should be capped.
  95. """
  96. limit: Int!
  97. first: Int
  98. after: String
  99. last: Int
  100. before: String
  101. where: ChannelWhereInput
  102. orderBy: [ChannelOrderByInput!]
  103. ): ChannelConnection!
  104. }