prod-schema.graphql 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. input MatchCriteria
  93. @join__type(graph: SPORTS)
  94. {
  95. type: MatchType!
  96. sport: Sport
  97. league: Int
  98. }
  99. enum MatchType
  100. @join__type(graph: SPORTS)
  101. {
  102. Basic @join__enumValue(graph: SPORTS)
  103. Special @join__enumValue(graph: SPORTS)
  104. Live @join__enumValue(graph: SPORTS)
  105. }
  106. type Mutation
  107. @join__type(graph: AUTH)
  108. {
  109. Signup(credentials: Credentials!): String
  110. Login(credentials: Credentials!): AccessTokenResponse
  111. RefreshToken(token: String!): AccessTokenResponse
  112. }
  113. interface Node
  114. @join__type(graph: AUTH)
  115. @join__type(graph: SPORTS)
  116. {
  117. id: ID!
  118. }
  119. type Query
  120. @join__type(graph: AUTH)
  121. @join__type(graph: SPORTS)
  122. {
  123. User(id: ID!): User @join__field(graph: AUTH)
  124. MatchList(after: String, before: String, first: Int, last: Int, reverse: Boolean = false, criteria: MatchCriteria!): [Match!]! @join__field(graph: SPORTS)
  125. }
  126. enum Sport
  127. @join__type(graph: SPORTS)
  128. {
  129. soccer @join__enumValue(graph: SPORTS)
  130. basketball @join__enumValue(graph: SPORTS)
  131. baseball @join__enumValue(graph: SPORTS)
  132. volleyball @join__enumValue(graph: SPORTS)
  133. icehockey @join__enumValue(graph: SPORTS)
  134. tennis @join__enumValue(graph: SPORTS)
  135. esports @join__enumValue(graph: SPORTS)
  136. tabletennis @join__enumValue(graph: SPORTS)
  137. handball @join__enumValue(graph: SPORTS)
  138. }
  139. type Team implements Node
  140. @join__implements(graph: SPORTS, interface: "Node")
  141. @join__type(graph: SPORTS, key: "id")
  142. {
  143. id: ID!
  144. name: String
  145. image: String
  146. }
  147. type User implements Node
  148. @join__implements(graph: AUTH, interface: "Node")
  149. @join__type(graph: AUTH, key: "id")
  150. {
  151. id: ID!
  152. username: String!
  153. created_at: DateTime!
  154. enabled: Boolean!
  155. email_verified: Boolean!
  156. first_name: String
  157. last_name: String
  158. email: String
  159. level: Int!
  160. }