Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add match creation sub + sub on points scored for a match only
- Loading branch information
Showing
7 changed files
with
127 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
package resolvers | ||
|
||
// PointScoredSubscriber : ?? | ||
import graphql "github.com/poudre-aux-yeux/graphql-go" | ||
|
||
// PointScoredSubscriber : subscribers to pointScored | ||
type PointScoredSubscriber struct { | ||
stop <-chan struct{} | ||
events chan<- *PointScoredEvent | ||
matchID graphql.ID | ||
} | ||
|
||
// MatchCreatedSubscriber : subscribers to matchCreated | ||
type MatchCreatedSubscriber struct { | ||
stop <-chan struct{} | ||
events chan<- *PointScoredEvent | ||
events chan<- *MatchCreatedEvent | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
# Dispatched when a point is scored | ||
# A point was scored | ||
type PointScoredEvent { | ||
# The match where the point was scored | ||
match: Match! | ||
# The team that scored the point. True = home, false = away | ||
team: Boolean! | ||
} | ||
|
||
# A match was created | ||
type MatchCreatedEvent { | ||
# The created match | ||
match: Match! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
type Subscription { | ||
pointScored(): PointScoredEvent! | ||
pointScored(matchId: ID!): PointScoredEvent! | ||
matchCreated(): MatchCreatedEvent! | ||
} |