video-api-schema.graphql 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. # Copyright (c) Meta Platforms, Inc. and affiliates.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. """
  15. The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.
  16. """
  17. scalar GlobalID
  18. @specifiedBy(url: "https://relay.dev/graphql/objectidentification.htm")
  19. type Mutation {
  20. createDeletionId: String!
  21. acceptTos: Boolean!
  22. acceptTermsOfService: String!
  23. uploadVideo(
  24. file: Upload!
  25. startTimeSec: Float = null
  26. durationTimeSec: Float = null
  27. ): Video!
  28. uploadSharedVideo(file: Upload!): SharedVideo!
  29. uploadAnnotations(file: Upload!): Boolean!
  30. }
  31. """
  32. An object with a Globally Unique ID
  33. """
  34. interface Node {
  35. """
  36. The Globally Unique ID of this object
  37. """
  38. id: GlobalID!
  39. }
  40. """
  41. Information to aid in pagination.
  42. """
  43. type PageInfo {
  44. """
  45. When paginating forwards, are there more items?
  46. """
  47. hasNextPage: Boolean!
  48. """
  49. When paginating backwards, are there more items?
  50. """
  51. hasPreviousPage: Boolean!
  52. """
  53. When paginating backwards, the cursor to continue.
  54. """
  55. startCursor: String
  56. """
  57. When paginating forwards, the cursor to continue.
  58. """
  59. endCursor: String
  60. }
  61. type Query {
  62. defaultVideo: Video!
  63. videos(
  64. """
  65. Returns the items in the list that come before the specified cursor.
  66. """
  67. before: String = null
  68. """
  69. Returns the items in the list that come after the specified cursor.
  70. """
  71. after: String = null
  72. """
  73. Returns the first n items from the list.
  74. """
  75. first: Int = null
  76. """
  77. Returns the items in the list that come after the specified cursor.
  78. """
  79. last: Int = null
  80. ): VideoConnection!
  81. sharedVideo(path: String!): SharedVideo!
  82. }
  83. type SharedVideo {
  84. path: String!
  85. url: String!
  86. }
  87. scalar Upload
  88. type Video implements Node {
  89. """
  90. The Globally Unique ID of this object
  91. """
  92. id: GlobalID!
  93. path: String!
  94. posterPath: String
  95. width: Int!
  96. height: Int!
  97. url: String!
  98. posterUrl: String!
  99. }
  100. """
  101. A connection to a list of items.
  102. """
  103. type VideoConnection {
  104. """
  105. Pagination data for this connection
  106. """
  107. pageInfo: PageInfo!
  108. """
  109. Contains the nodes in this connection
  110. """
  111. edges: [VideoEdge!]!
  112. }
  113. """
  114. An edge in a connection.
  115. """
  116. type VideoEdge {
  117. """
  118. A cursor for use in pagination
  119. """
  120. cursor: String!
  121. """
  122. The item at the end of the edge
  123. """
  124. node: Video!
  125. }