Kaynağa Gözat

Supergraph

- update sports
Alexey Kim 1 yıl önce
ebeveyn
işleme
cab34461f5
2 değiştirilmiş dosya ile 43 ekleme ve 15 silme
  1. 42 14
      devops/prod-schema.graphql
  2. 1 1
      graph/sports

+ 42 - 14
devops/prod-schema.graphql

@@ -35,7 +35,7 @@ type AccessTokenResponse
 }
 
 type Country
-  @join__type(graph: SPORTS, key: "name")
+  @join__type(graph: SPORTS)
 {
   name: String!
   image: String
@@ -60,6 +60,9 @@ enum ErrorAuth
   INVALID_ARGUMENT @join__enumValue(graph: AUTH)
 }
 
+scalar Int64
+  @join__type(graph: SPORTS)
+
 scalar join__FieldSet
 
 enum join__Graph {
@@ -70,11 +73,17 @@ enum join__Graph {
 scalar JSON
   @join__type(graph: SPORTS)
 
-type League implements Node
-  @join__implements(graph: SPORTS, interface: "Node")
+type Lane
+  @join__type(graph: SPORTS)
+{
+  key: String!
+  value: Float!
+}
+
+type League
   @join__type(graph: SPORTS, key: "id")
 {
-  id: ID!
+  id: Int64!
   name: String!
   image: String
   country: Country
@@ -94,13 +103,31 @@ enum link__Purpose {
   EXECUTION
 }
 
-type Match implements Node
-  @join__implements(graph: SPORTS, interface: "Node")
+type Market
+  @join__type(graph: SPORTS)
+{
+  match_id: Int64!
+  market_id: Int64!
+  status: Boolean!
+  updated_at: DateTime!
+  spreading: [MarketPoint!]!
+}
+
+type MarketPoint
+  @join__type(graph: SPORTS)
+{
+  value: Float
+  status: Boolean!
+  lanes: [Lane!]!
+}
+
+type Match
   @join__type(graph: SPORTS, key: "id")
 {
-  id: ID!
-  status: Int!
-  period: Int!
+  id: Int64!
+  sport: Sport!
+  status: Int64!
+  period: Int64!
   league: League!
   home_team: Team!
   away_team: Team!
@@ -108,6 +135,7 @@ type Match implements Node
   timer: String
   score: JSON
   updated_at: DateTime!
+  markets: [Market!]!
 }
 
 type MatchConnection
@@ -143,7 +171,6 @@ type Mutation
 
 interface Node
   @join__type(graph: AUTH)
-  @join__type(graph: SPORTS)
 {
   id: ID!
 }
@@ -162,6 +189,8 @@ type Query
   @join__type(graph: SPORTS)
 {
   User(id: ID!): User @join__field(graph: AUTH)
+  Match(id: Int64!): Match @join__field(graph: SPORTS)
+  Markets(match_id: Int64!): [Market!]! @join__field(graph: SPORTS)
   MatchList(after: String, before: String, first: Int, last: Int, reverse: Boolean = false, criteria: MatchCriteria!): MatchConnection! @join__field(graph: SPORTS)
 }
 
@@ -179,12 +208,11 @@ enum Sport
   handball @join__enumValue(graph: SPORTS)
 }
 
-type Team implements Node
-  @join__implements(graph: SPORTS, interface: "Node")
+type Team
   @join__type(graph: SPORTS, key: "id")
 {
-  id: ID!
-  name: String
+  id: Int64!
+  name: String!
   image: String
 }
 

+ 1 - 1
graph/sports

@@ -1 +1 @@
-Subproject commit 8fcb75af858594af45250aa09fc8d37010123f75
+Subproject commit 50474e08fa2301f1e073164fd7ebd89c4b475212