prod-schema.graphql 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. }
  8. directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE
  9. 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
  10. directive @join__graph(name: String!, url: String!) on ENUM_VALUE
  11. directive @join__implements(graph: join__Graph!, interface: String!) repeatable on OBJECT | INTERFACE
  12. 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
  13. directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION
  14. directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA
  15. type AccessTokenResponse
  16. @join__type(graph: AUTH)
  17. {
  18. access_token: String!
  19. id_token: String!
  20. token_type: String!
  21. expires_in: Int!
  22. refresh_token: String!
  23. refresh_expires_in: Int!
  24. not_before_policy: Int!
  25. session_state: String!
  26. scope: [String!]!
  27. }
  28. type Country
  29. @join__type(graph: SPORTS, key: "name")
  30. {
  31. name: String!
  32. image: String
  33. }
  34. input Credentials
  35. @join__type(graph: AUTH)
  36. {
  37. username: String!
  38. password: String!
  39. }
  40. scalar DateTime
  41. @join__type(graph: AUTH)
  42. @join__type(graph: SPORTS)
  43. enum ErrorAuth
  44. @join__type(graph: AUTH)
  45. {
  46. ILLEGAL_USERNAME @join__enumValue(graph: AUTH)
  47. ALREADY_EXISTS @join__enumValue(graph: AUTH)
  48. INVALID_ARGUMENT @join__enumValue(graph: AUTH)
  49. }
  50. scalar join__FieldSet
  51. enum join__Graph {
  52. AUTH @join__graph(name: "auth", url: "https://auth.craft.beejay.kim")
  53. SPORTS @join__graph(name: "sports", url: "https://sports.craft.beejay.kim")
  54. }
  55. scalar JSON
  56. @join__type(graph: SPORTS)
  57. type League implements Node
  58. @join__implements(graph: SPORTS, interface: "Node")
  59. @join__type(graph: SPORTS, key: "id")
  60. {
  61. id: ID!
  62. name: String!
  63. image: String
  64. country: Country
  65. }
  66. scalar link__Import
  67. enum link__Purpose {
  68. """
  69. `SECURITY` features provide metadata necessary to securely resolve fields.
  70. """
  71. SECURITY
  72. """
  73. `EXECUTION` features provide metadata necessary for operation execution.
  74. """
  75. EXECUTION
  76. }
  77. type Match implements Node
  78. @join__implements(graph: SPORTS, interface: "Node")
  79. @join__type(graph: SPORTS, key: "id")
  80. {
  81. id: ID!
  82. status: Int!
  83. period: Int!
  84. league: League!
  85. home_team: Team!
  86. away_team: Team!
  87. time: DateTime!
  88. timer: String
  89. score: JSON
  90. updated_at: DateTime!
  91. }
  92. type MatchConnection
  93. @join__type(graph: SPORTS)
  94. {
  95. nodes: [Match!]!
  96. page_info: PageInfo!
  97. }
  98. input MatchCriteria
  99. @join__type(graph: SPORTS)
  100. {
  101. type: MatchType!
  102. sport: Sport
  103. league: Int
  104. }
  105. enum MatchType
  106. @join__type(graph: SPORTS)
  107. {
  108. Basic @join__enumValue(graph: SPORTS)
  109. Special @join__enumValue(graph: SPORTS)
  110. Live @join__enumValue(graph: SPORTS)
  111. }
  112. type Mutation
  113. @join__type(graph: AUTH)
  114. {
  115. Signup(credentials: Credentials!): String
  116. Login(credentials: Credentials!): AccessTokenResponse
  117. RefreshToken(token: String!): AccessTokenResponse
  118. }
  119. interface Node
  120. @join__type(graph: AUTH)
  121. @join__type(graph: SPORTS)
  122. {
  123. id: ID!
  124. }
  125. type PageInfo
  126. @join__type(graph: SPORTS)
  127. {
  128. start_cursor: String
  129. end_cursor: String
  130. has_next_page: Boolean!
  131. has_previous_page: Boolean!
  132. }
  133. type Query
  134. @join__type(graph: AUTH)
  135. @join__type(graph: SPORTS)
  136. {
  137. User(id: ID!): User @join__field(graph: AUTH)
  138. MatchList(after: String, before: String, first: Int, last: Int, reverse: Boolean = false, criteria: MatchCriteria!): MatchConnection! @join__field(graph: SPORTS)
  139. }
  140. enum Sport
  141. @join__type(graph: SPORTS)
  142. {
  143. soccer @join__enumValue(graph: SPORTS)
  144. basketball @join__enumValue(graph: SPORTS)
  145. baseball @join__enumValue(graph: SPORTS)
  146. volleyball @join__enumValue(graph: SPORTS)
  147. icehockey @join__enumValue(graph: SPORTS)
  148. tennis @join__enumValue(graph: SPORTS)
  149. esports @join__enumValue(graph: SPORTS)
  150. tabletennis @join__enumValue(graph: SPORTS)
  151. handball @join__enumValue(graph: SPORTS)
  152. }
  153. type Team implements Node
  154. @join__implements(graph: SPORTS, interface: "Node")
  155. @join__type(graph: SPORTS, key: "id")
  156. {
  157. id: ID!
  158. name: String
  159. image: String
  160. }
  161. type User implements Node
  162. @join__implements(graph: AUTH, interface: "Node")
  163. @join__type(graph: AUTH, key: "id")
  164. {
  165. id: ID!
  166. username: String!
  167. created_at: DateTime!
  168. enabled: Boolean!
  169. email_verified: Boolean!
  170. first_name: String
  171. last_name: String
  172. email: String
  173. level: Int!
  174. }