Appendix B: FeedConfig GraphQL type
This solution includes an option to set various levels of
configurations for third-party data feeds and sports data providers.
These configurations are initiated by setting the FeedConfig
field
type for one or more game event types including Sports, Competition,
Season, Stage,
and Game
.
This section describes the FeedConfig GraphQL type, its attributes, and how the FeedConfig works across the solution.
type FeedConfig @aws_iam @aws_api_key { providerId: String feedId: String url: String type: String operation: String providerkey: String }
The providerId
and feedId
fields identify the sport data providers
and a particular sports feed for mapping in the configuration. The
URL field contains the link to the poll that gets data from the
provider. For example, if you use the same provider
(Sportradar.com) that is used in
this solution’s Game Simulation stack, the URL for the Game type,
FeedConfig
field is:
https://api.sportradar.us/soccer-t3/eu/en/matches/
<GAME_ID>
/timeline.json?api_key=<API_KEY>
This solution provides three additional fields to expand the configuration options: type, operation, and providerkey. For example, you can define the HTTP method or provide a specific operations-related API key).
A business logic is implemented in the
GameSchedulerFunction
AWS Lambda
function to enable you to set up the FeedConfig
field at different
levels at the same time. This business logic sets the necessary
configurations for each game managed by the AWS Step Function
workflow for ingestion polling. This business logic uses override
concepts to achieve the proper configurations, based on the
following priority order: (1) Game, (2) Stage, (3) Season, (4)
Competition, and (5) Sport. For example, a FeedConfig
setting in a
Game entry will override a FeedConfig
setting in a Stage entry.