file.graphql 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. scalar Upload
  2. query fsFiles($directory: String!) {
  3. fsFiles(directory: $directory) {
  4. filename
  5. path
  6. size
  7. ctime
  8. mtime
  9. }
  10. }
  11. query files(
  12. $where: FileWhereInput
  13. $orderBy: FileOrderByInput
  14. $skip: Int
  15. $after: String
  16. $before: String
  17. $first: Int
  18. $last: Int
  19. ) {
  20. files(
  21. where: $where
  22. orderBy: $orderBy
  23. skip: $skip
  24. after: $after
  25. before: $before
  26. first: $first
  27. last: $last
  28. ) {
  29. id
  30. path
  31. mimetype
  32. user {
  33. id
  34. name
  35. }
  36. thumbnail
  37. filename
  38. size
  39. updatedAt
  40. comment
  41. }
  42. }
  43. mutation uploadFile($file: Upload!, $comment: String) {
  44. uploadFile(file: $file, comment: $comment) {
  45. id
  46. path
  47. mimetype
  48. thumbnail
  49. filename
  50. size
  51. comment
  52. }
  53. }
  54. query videos {
  55. videos {
  56. id
  57. title
  58. description
  59. duration
  60. file {
  61. id
  62. path
  63. size
  64. thumbnail
  65. comment
  66. }
  67. link
  68. }
  69. }
  70. query video($where: VideoWhereUniqueInput!) {
  71. video(where: $where) {
  72. id
  73. title
  74. description
  75. duration
  76. file {
  77. id
  78. path
  79. size
  80. thumbnail
  81. comment
  82. }
  83. }
  84. }
  85. mutation createVideo($data: VideoCreateInput) {
  86. createVideo(data: $data) {
  87. id
  88. }
  89. }
  90. mutation updateVideo($data: VideoUpdateInput!, $where: VideoWhereUniqueInput!) {
  91. updateVideo(data: $data, where: $where) {
  92. id
  93. }
  94. }
  95. query pictures {
  96. pictures {
  97. id
  98. title
  99. description
  100. file {
  101. id
  102. path
  103. size
  104. thumbnail
  105. comment
  106. }
  107. link
  108. }
  109. }
  110. query picture($where: VideoWhereUniqueInput!) {
  111. picture(where: $where) {
  112. id
  113. title
  114. description
  115. file {
  116. id
  117. path
  118. size
  119. thumbnail
  120. comment
  121. }
  122. }
  123. }
  124. mutation createPicture($data: PictureCreateInput) {
  125. createPicture(data: $data) {
  126. id
  127. }
  128. }
  129. mutation updatePicture($data: PictureUpdateInput!, $where: PictureWhereUniqueInput!) {
  130. updatePicture(data: $data, where: $where) {
  131. id
  132. }
  133. }