schema.graphql 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. success: Boolean!
  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. Returns information about the current logged in user
  120. """
  121. me: User
  122. """
  123. Fetches an object given its ID.
  124. """
  125. node(
  126. """
  127. ID of the object.
  128. """
  129. id: ID!
  130. ): Node
  131. """
  132. Fetches a list of objects given a list of IDs.
  133. """
  134. nodes(
  135. """
  136. IDs of the objects.
  137. """
  138. ids: [ID!]!
  139. ): [Node]!
  140. """
  141. Fetches exactly zero or one pokemon
  142. """
  143. pokemon(id: String, ids: [String!], iid: ID, iids: [ID!], nickname: String, nicknames: [String!], pokedexNumber: Int, pokedexNumbers: [Int!]): Pokemon
  144. """
  145. Fetches one or more pokemon for Relay
  146. """
  147. pokemonConnection(
  148. """
  149. Returns the elements in the list that come after the specified cursor.
  150. """
  151. after: String
  152. """
  153. Returns the elements in the list that come before the specified cursor.
  154. """
  155. before: String
  156. """
  157. Returns the first _n_ elements from the list.
  158. """
  159. first: Int
  160. id: String
  161. ids: [String!]
  162. iid: ID
  163. iids: [ID!]
  164. """
  165. Returns the last _n_ elements from the list.
  166. """
  167. last: Int
  168. nickname: String
  169. nicknames: [String!]
  170. pokedexNumber: Int
  171. pokedexNumbers: [Int!]
  172. ): PokemonConnection!
  173. }
  174. """
  175. Autogenerated return type of SignUp
  176. """
  177. type SignUpPayload {
  178. user: User!
  179. }
  180. """
  181. Time represented in ISO 8601
  182. """
  183. scalar Time
  184. """
  185. Autogenerated return type of UploadManyPokemon
  186. """
  187. type UploadManyPokemonPayload {
  188. errors: [Error!]!
  189. pokemon: [Pokemon!]
  190. }
  191. """
  192. Autogenerated return type of UploadPokemon
  193. """
  194. type UploadPokemonPayload {
  195. errors: [Error!]!
  196. pokemon: Pokemon
  197. }
  198. """
  199. Returns a singular user
  200. """
  201. type User implements Node {
  202. email: String
  203. id: ID!
  204. iid: ID!
  205. username: String
  206. }