prod-schema.graphql 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. schema
  2. @link(url: "https://specs.apollo.dev/link/v1.0")
  3. @link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION)
  4. {
  5. query: Query
  6. mutation: Mutation
  7. subscription: Subscription
  8. }
  9. directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE
  10. directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
  11. directive @join__graph(name: String!, url: String!) on ENUM_VALUE
  12. directive @join__implements(graph: join__Graph!, interface: String!) repeatable on OBJECT | INTERFACE
  13. directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR
  14. directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION
  15. directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA
  16. type AccessTokenResponse
  17. @join__type(graph: AUTH)
  18. {
  19. access_token: String!
  20. id_token: String!
  21. token_type: String!
  22. expires_in: Int!
  23. refresh_token: String!
  24. refresh_expires_in: Int!
  25. not_before_policy: Int!
  26. session_state: String!
  27. scope: [String!]!
  28. }
  29. type Country
  30. @join__type(graph: SPORTS)
  31. {
  32. name: String!
  33. image: String
  34. }
  35. input Credentials
  36. @join__type(graph: AUTH)
  37. {
  38. username: String!
  39. password: String!
  40. }
  41. scalar DateTime
  42. @join__type(graph: AUTH)
  43. @join__type(graph: SPORTS)
  44. enum ErrorAuth
  45. @join__type(graph: AUTH)
  46. {
  47. ILLEGAL_USERNAME @join__enumValue(graph: AUTH)
  48. ALREADY_EXISTS @join__enumValue(graph: AUTH)
  49. INVALID_ARGUMENT @join__enumValue(graph: AUTH)
  50. }
  51. scalar Int64
  52. @join__type(graph: SPORTS)
  53. scalar join__FieldSet
  54. enum join__Graph {
  55. AUTH @join__graph(name: "auth", url: "https://auth.craft.beejay.kim")
  56. SPORTS @join__graph(name: "sports", url: "https://sports.craft.beejay.kim")
  57. }
  58. scalar JSON
  59. @join__type(graph: SPORTS)
  60. type Lane
  61. @join__type(graph: SPORTS)
  62. {
  63. key: String!
  64. value: Float!
  65. }
  66. type League
  67. @join__type(graph: SPORTS, key: "id")
  68. {
  69. id: Int64!
  70. name: String!
  71. image: String
  72. country: Country
  73. }
  74. scalar link__Import
  75. enum link__Purpose {
  76. """
  77. `SECURITY` features provide metadata necessary to securely resolve fields.
  78. """
  79. SECURITY
  80. """
  81. `EXECUTION` features provide metadata necessary for operation execution.
  82. """
  83. EXECUTION
  84. }
  85. type Market
  86. @join__type(graph: SPORTS)
  87. {
  88. match_id: Int64!
  89. market_id: Int64!
  90. status: Boolean!
  91. updated_at: DateTime!
  92. spreading: [MarketPoint!]!
  93. }
  94. type MarketPoint
  95. @join__type(graph: SPORTS)
  96. {
  97. value: Float
  98. status: Boolean!
  99. lanes: [Lane!]!
  100. }
  101. type Match
  102. @join__type(graph: SPORTS, key: "id")
  103. {
  104. id: Int64!
  105. sport: Sport!
  106. status: Int64!
  107. period: Int64!
  108. league: League!
  109. home_team: Team!
  110. away_team: Team!
  111. time: DateTime!
  112. timer: String
  113. score: JSON
  114. updated_at: DateTime!
  115. markets: [Market!]!
  116. }
  117. type MatchConnection
  118. @join__type(graph: SPORTS)
  119. {
  120. edges: [Match!]!
  121. page_info: PageInfo!
  122. }
  123. input MatchCriteria
  124. @join__type(graph: SPORTS)
  125. {
  126. type: MatchType!
  127. timezone: String!
  128. sport: Sport
  129. league: Int
  130. }
  131. enum MatchType
  132. @join__type(graph: SPORTS)
  133. {
  134. Basic @join__enumValue(graph: SPORTS)
  135. Special @join__enumValue(graph: SPORTS)
  136. Live @join__enumValue(graph: SPORTS)
  137. Hybrid @join__enumValue(graph: SPORTS)
  138. }
  139. type Mutation
  140. @join__type(graph: AUTH)
  141. @join__type(graph: SPORTS)
  142. {
  143. Signup(credentials: Credentials!): String @join__field(graph: AUTH)
  144. Login(credentials: Credentials!): AccessTokenResponse @join__field(graph: AUTH)
  145. Logout(token: String!): Boolean! @join__field(graph: AUTH)
  146. RefreshToken(token: String!): AccessTokenResponse @join__field(graph: AUTH)
  147. PlaceCryptoOrder(symbol: String!, direction: Int!): Boolean! @join__field(graph: SPORTS)
  148. }
  149. interface Node
  150. @join__type(graph: AUTH)
  151. {
  152. id: ID!
  153. }
  154. type PageInfo
  155. @join__type(graph: SPORTS)
  156. {
  157. start_cursor: String
  158. end_cursor: String
  159. has_next_page: Boolean!
  160. has_previous_page: Boolean!
  161. }
  162. type Query
  163. @join__type(graph: AUTH)
  164. @join__type(graph: SPORTS)
  165. {
  166. User(id: ID!): User @join__field(graph: AUTH)
  167. Match(id: Int64!): Match @join__field(graph: SPORTS)
  168. Markets(match_id: Int64!): [Market!]! @join__field(graph: SPORTS)
  169. MatchList(after: String, before: String, first: Int, last: Int, reverse: Boolean = false, criteria: MatchCriteria!): MatchConnection! @join__field(graph: SPORTS)
  170. }
  171. enum Sport
  172. @join__type(graph: SPORTS)
  173. {
  174. soccer @join__enumValue(graph: SPORTS)
  175. basketball @join__enumValue(graph: SPORTS)
  176. baseball @join__enumValue(graph: SPORTS)
  177. volleyball @join__enumValue(graph: SPORTS)
  178. icehockey @join__enumValue(graph: SPORTS)
  179. tennis @join__enumValue(graph: SPORTS)
  180. esports @join__enumValue(graph: SPORTS)
  181. tabletennis @join__enumValue(graph: SPORTS)
  182. handball @join__enumValue(graph: SPORTS)
  183. americanfootball @join__enumValue(graph: SPORTS)
  184. boxing @join__enumValue(graph: SPORTS)
  185. }
  186. type Subscription
  187. @join__type(graph: SPORTS)
  188. {
  189. CryptoOrderResult: Int!
  190. }
  191. type Team
  192. @join__type(graph: SPORTS, key: "id")
  193. {
  194. id: Int64!
  195. name: String!
  196. image: String
  197. }
  198. type User implements Node
  199. @join__implements(graph: AUTH, interface: "Node")
  200. @join__type(graph: AUTH, key: "id")
  201. {
  202. id: ID!
  203. username: String!
  204. created_at: DateTime!
  205. enabled: Boolean!
  206. email_verified: Boolean!
  207. first_name: String
  208. last_name: String
  209. email: String
  210. level: Int!
  211. }