schema.graphql 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. """
  2. Autogenerated return type of ConfirmAccount
  3. """
  4. type ConfirmAccountPayload {
  5. user: User
  6. }
  7. """
  8. Autogenerated return type of CreatePokemon
  9. """
  10. type CreatePokemonPayload {
  11. errors: [Error!]!
  12. pokemon: Pokemon
  13. }
  14. type Error {
  15. message: String!
  16. type: String
  17. }
  18. """
  19. Autogenerated return type of Login
  20. """
  21. type LoginPayload {
  22. user: User!
  23. }
  24. """
  25. Autogenerated return type of Logout
  26. """
  27. type LogoutPayload {
  28. user: User!
  29. }
  30. type Mutation {
  31. createPokemon(nickname: String, pokedexNumber: ID!): CreatePokemonPayload
  32. uploadManyPokemon(base64EncodedPokemonFiles: [String!]!): UploadManyPokemonPayload
  33. uploadPokemon(base64EncodedPokemonFile: String!): UploadPokemonPayload
  34. userConfirmAccount(confirmationToken: String!, redirectUrl: String!): ConfirmAccountPayload
  35. userLogin(login: String!, password: String!): LoginPayload
  36. userLogout: LogoutPayload
  37. userSignup(confirmSuccessUrl: String, email: String!, password: String!, passwordConfirmation: String!, username: String!): SignUpPayload
  38. }
  39. """
  40. An object with an ID.
  41. """
  42. interface Node {
  43. """
  44. ID of the object.
  45. """
  46. id: ID!
  47. }
  48. """
  49. Information about pagination in a connection.
  50. """
  51. type PageInfo {
  52. """
  53. When paginating forwards, the cursor to continue.
  54. """
  55. endCursor: String
  56. """
  57. When paginating forwards, are there more items?
  58. """
  59. hasNextPage: Boolean!
  60. """
  61. When paginating backwards, are there more items?
  62. """
  63. hasPreviousPage: Boolean!
  64. """
  65. When paginating backwards, the cursor to continue.
  66. """
  67. startCursor: String
  68. }
  69. """
  70. Returns a singular pokemon
  71. """
  72. type Pokemon implements Node {
  73. createdAt: Time
  74. id: ID!
  75. iid: ID!
  76. nickname: String
  77. pokedexNumber: Int
  78. updatedAt: Time
  79. }
  80. """
  81. The connection type for Pokemon.
  82. """
  83. type PokemonConnection {
  84. """
  85. A list of edges.
  86. """
  87. edges: [PokemonEdge]
  88. """
  89. A list of nodes.
  90. """
  91. nodes: [Pokemon]
  92. """
  93. Information to aid in pagination.
  94. """
  95. pageInfo: PageInfo!
  96. }
  97. """
  98. An edge in a connection.
  99. """
  100. type PokemonEdge {
  101. """
  102. A cursor for use in pagination.
  103. """
  104. cursor: String!
  105. """
  106. The item at the end of the edge.
  107. """
  108. node: Pokemon
  109. }
  110. """
  111. The root of this schema
  112. """
  113. type Query {
  114. """
  115. Fetches one or more pokemon
  116. """
  117. manyPokemon(id: String, ids: [String!], iid: ID, iids: [ID!], nickname: String, nicknames: [String!], pokedexNumber: Int, pokedexNumbers: [Int!]): [Pokemon!]!
  118. """
  119. Fetches an object given its ID.
  120. """
  121. node(
  122. """
  123. ID of the object.
  124. """
  125. id: ID!
  126. ): Node
  127. """
  128. Fetches a list of objects given a list of IDs.
  129. """
  130. nodes(
  131. """
  132. IDs of the objects.
  133. """
  134. ids: [ID!]!
  135. ): [Node]!
  136. """
  137. Fetches exactly zero or one pokemon
  138. """
  139. pokemon(id: String, ids: [String!], iid: ID, iids: [ID!], nickname: String, nicknames: [String!], pokedexNumber: Int, pokedexNumbers: [Int!]): Pokemon
  140. """
  141. Fetches one or more pokemon for Relay
  142. """
  143. pokemonConnection(
  144. """
  145. Returns the elements in the list that come after the specified cursor.
  146. """
  147. after: String
  148. """
  149. Returns the elements in the list that come before the specified cursor.
  150. """
  151. before: String
  152. """
  153. Returns the first _n_ elements from the list.
  154. """
  155. first: Int
  156. id: String
  157. ids: [String!]
  158. iid: ID
  159. iids: [ID!]
  160. """
  161. Returns the last _n_ elements from the list.
  162. """
  163. last: Int
  164. nickname: String
  165. nicknames: [String!]
  166. pokedexNumber: Int
  167. pokedexNumbers: [Int!]
  168. ): PokemonConnection!
  169. }
  170. """
  171. Autogenerated return type of SignUp
  172. """
  173. type SignUpPayload {
  174. user: User!
  175. }
  176. """
  177. Time represented in ISO 8601
  178. """
  179. scalar Time
  180. """
  181. Autogenerated return type of UploadManyPokemon
  182. """
  183. type UploadManyPokemonPayload {
  184. errors: [Error!]!
  185. pokemon: [Pokemon!]
  186. }
  187. """
  188. Autogenerated return type of UploadPokemon
  189. """
  190. type UploadPokemonPayload {
  191. errors: [Error!]!
  192. pokemon: Pokemon
  193. }
  194. """
  195. Returns a singular user
  196. """
  197. type User implements Node {
  198. createdAt: Time
  199. email: String
  200. id: ID!
  201. iid: ID!
  202. updatedAt: Time
  203. username: String
  204. }