generated

package
v0.0.0-...-c5fd561 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownType  = errors.New("unknown type")
	ErrTypeNotFound = errors.New("type not found")
)

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	AverageStats struct {
		Assists                func(childComplexity int) int
		Blocks                 func(childComplexity int) int
		BlocksSteals           func(childComplexity int) int
		DefensiveRebounds      func(childComplexity int) int
		DoubleDouble           func(childComplexity int) int
		FantasyScore           func(childComplexity int) int
		FieldGoalsAttempted    func(childComplexity int) int
		FieldGoalsMade         func(childComplexity int) int
		FreeThrowsAttempted    func(childComplexity int) int
		FreeThrowsMade         func(childComplexity int) int
		GamesPlayed            func(childComplexity int) int
		Height                 func(childComplexity int) int
		Minutes                func(childComplexity int) int
		OffensiveRebounds      func(childComplexity int) int
		Passes                 func(childComplexity int) int
		PersonalFouls          func(childComplexity int) int
		PersonalFoulsDrawn     func(childComplexity int) int
		Points                 func(childComplexity int) int
		PointsAssists          func(childComplexity int) int
		PointsRebounds         func(childComplexity int) int
		PointsReboundsAssists  func(childComplexity int) int
		PotentialAssists       func(childComplexity int) int
		Rebounds               func(childComplexity int) int
		ReboundsAssists        func(childComplexity int) int
		Steals                 func(childComplexity int) int
		ThreePointersAttempted func(childComplexity int) int
		ThreePointersMade      func(childComplexity int) int
		Turnovers              func(childComplexity int) int
		Weight                 func(childComplexity int) int
	}

	GamePrediction struct {
		Estimation         func(childComplexity int) int
		EstimationAccuracy func(childComplexity int) int
		Fragments          func(childComplexity int) int
	}

	GamePredictionFragment struct {
		Base         func(childComplexity int) int
		Derived      func(childComplexity int) int
		DerivedGames func(childComplexity int) int
		Name         func(childComplexity int) int
		PctChange    func(childComplexity int) int
		Propositions func(childComplexity int, input *model.PropositionFilter) int
		Weight       func(childComplexity int) int
	}

	Player struct {
		Games    func(childComplexity int, input model.GameFilter) int
		Height   func(childComplexity int) int
		Image    func(childComplexity int) int
		League   func(childComplexity int) int
		Name     func(childComplexity int) int
		PlayerID func(childComplexity int) int
		Position func(childComplexity int) int
		Seasons  func(childComplexity int) int
		Team     func(childComplexity int) int
		Weight   func(childComplexity int) int
	}

	PlayerGame struct {
		AssistConversionRate         func(childComplexity int) int
		AssistPercentage             func(childComplexity int) int
		Assists                      func(childComplexity int) int
		Blocks                       func(childComplexity int) int
		BlocksSteals                 func(childComplexity int) int
		Date                         func(childComplexity int) int
		DefensiveReboundPercentage   func(childComplexity int) int
		DefensiveRebounds            func(childComplexity int) int
		EffectiveFieldGoalPercentage func(childComplexity int) int
		FantasyScore                 func(childComplexity int) int
		FieldGoalPercentage          func(childComplexity int) int
		FieldGoalsAttempted          func(childComplexity int) int
		FieldGoalsMade               func(childComplexity int) int
		FreeThrowsAttempted          func(childComplexity int) int
		FreeThrowsMade               func(childComplexity int) int
		FreeThrowsPercentage         func(childComplexity int) int
		GameID                       func(childComplexity int) int
		HomeOrAway                   func(childComplexity int) int
		Margin                       func(childComplexity int) int
		Minutes                      func(childComplexity int) int
		OffensiveReboundPercentage   func(childComplexity int) int
		OffensiveRebounds            func(childComplexity int) int
		Opponent                     func(childComplexity int) int
		OpponentStats                func(childComplexity int) int
		Outcome                      func(childComplexity int) int
		Passes                       func(childComplexity int) int
		PersonalFouls                func(childComplexity int) int
		PersonalFoulsDrawn           func(childComplexity int) int
		Player                       func(childComplexity int) int
		Playoffs                     func(childComplexity int) int
		Points                       func(childComplexity int) int
		PointsAssists                func(childComplexity int) int
		PointsRebounds               func(childComplexity int) int
		PointsReboundsAssists        func(childComplexity int) int
		PotentialAssists             func(childComplexity int) int
		Prediction                   func(childComplexity int, input model.ModelInput) int
		Propositions                 func(childComplexity int, input *model.PropositionFilter) int
		Rebounds                     func(childComplexity int) int
		ReboundsAssists              func(childComplexity int) int
		Season                       func(childComplexity int) int
		Steals                       func(childComplexity int) int
		Team                         func(childComplexity int) int
		TeamStats                    func(childComplexity int) int
		ThreePointPercentage         func(childComplexity int) int
		ThreePointersAttempted       func(childComplexity int) int
		ThreePointersMade            func(childComplexity int) int
		TrueShootingPercentage       func(childComplexity int) int
		Turnovers                    func(childComplexity int) int
		Usage                        func(childComplexity int) int
	}

	PropBreakdown struct {
		Base              func(childComplexity int) int
		Contribution      func(childComplexity int) int
		DerivedAverage    func(childComplexity int) int
		DerivedGames      func(childComplexity int) int
		DerivedGamesCount func(childComplexity int) int
		Name              func(childComplexity int) int
		Over              func(childComplexity int) int
		OverPct           func(childComplexity int) int
		PctChange         func(childComplexity int) int
		Push              func(childComplexity int) int
		PushPct           func(childComplexity int) int
		StdDev            func(childComplexity int) int
		Under             func(childComplexity int) int
		UnderPct          func(childComplexity int) int
		Weight            func(childComplexity int) int
	}

	PropPrediction struct {
		Breakdowns         func(childComplexity int) int
		CumulativeOver     func(childComplexity int) int
		CumulativeOverPct  func(childComplexity int) int
		CumulativePush     func(childComplexity int) int
		CumulativePushPct  func(childComplexity int) int
		CumulativeUnder    func(childComplexity int) int
		CumulativeUnderPct func(childComplexity int) int
		Estimation         func(childComplexity int) int
		EstimationAccuracy func(childComplexity int) int
		Significance       func(childComplexity int) int
		StdDev             func(childComplexity int) int
		Wager              func(childComplexity int) int
		WagerOutcome       func(childComplexity int) int
	}

	Proposition struct {
		Accuracy     func(childComplexity int) int
		ActualResult func(childComplexity int) int
		Game         func(childComplexity int) int
		LastModified func(childComplexity int) int
		Outcome      func(childComplexity int) int
		Prediction   func(childComplexity int, input model.ModelInput) int
		Sportsbook   func(childComplexity int) int
		Target       func(childComplexity int) int
		Type         func(childComplexity int) int
	}

	Query struct {
		Games        func(childComplexity int, input model.GameFilter) int
		Players      func(childComplexity int, input *model.PlayerFilter) int
		Propositions func(childComplexity int, input model.PropositionFilter) int
		Teams        func(childComplexity int, input model.TeamFilter) int
		// contains filtered or unexported fields
	}

	Team struct {
		Abbreviation func(childComplexity int) int
		League       func(childComplexity int) int
		Location     func(childComplexity int) int
		LogoImage    func(childComplexity int) int
		Name         func(childComplexity int) int
		NumLoss      func(childComplexity int) int
		NumWins      func(childComplexity int) int
		Players      func(childComplexity int) int
		TeamID       func(childComplexity int) int
	}

	TeamGame struct {
		Assists                              func(childComplexity int) int
		Blocks                               func(childComplexity int) int
		Date                                 func(childComplexity int) int
		DefensiveRating                      func(childComplexity int) int
		DefensiveReboundPercentage           func(childComplexity int) int
		DefensiveRebounds                    func(childComplexity int) int
		FieldGoalPercentage                  func(childComplexity int) int
		FieldGoalsAttempted                  func(childComplexity int) int
		FieldGoalsMade                       func(childComplexity int) int
		FreeThrowsAttempted                  func(childComplexity int) int
		FreeThrowsMade                       func(childComplexity int) int
		FreeThrowsPercentage                 func(childComplexity int) int
		GameID                               func(childComplexity int) int
		HomeOrAway                           func(childComplexity int) int
		Margin                               func(childComplexity int) int
		OffensiveReboundPercentage           func(childComplexity int) int
		OffensiveRebounds                    func(childComplexity int) int
		Opponent                             func(childComplexity int) int
		OpponentAssists                      func(childComplexity int) int
		OpponentEffectiveFieldGoalPercentage func(childComplexity int) int
		OpponentFieldGoalsAttempted          func(childComplexity int) int
		OpponentFreeThrowsAttempted          func(childComplexity int) int
		OpponentPoints                       func(childComplexity int) int
		OpponentRebounds                     func(childComplexity int) int
		OpponentThreePointersAttempted       func(childComplexity int) int
		OpponentThreePointersMade            func(childComplexity int) int
		PersonalFouls                        func(childComplexity int) int
		PersonalFoulsDrawn                   func(childComplexity int) int
		Playoffs                             func(childComplexity int) int
		PlusMinusPerHundred                  func(childComplexity int) int
		Points                               func(childComplexity int) int
		Possessions                          func(childComplexity int) int
		Rebounds                             func(childComplexity int) int
		Season                               func(childComplexity int) int
		Steals                               func(childComplexity int) int
		ThreePointersAttempted               func(childComplexity int) int
		ThreePointersMade                    func(childComplexity int) int
		Turnovers                            func(childComplexity int) int
		WinOrLoss                            func(childComplexity int) int
	}
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type PeriodResolver

type PeriodResolver interface {
	MatchSeason(ctx context.Context, obj *model.Period, data *bool) error
	MatchPreviousSeason(ctx context.Context, obj *model.Period, data *bool) error
}

type PlayerFilterResolver

type PlayerFilterResolver interface {
	WithPropositions(ctx context.Context, obj *model.PlayerFilter, data *model.PropositionFilter) error
}

type PlayerGameResolver

type PlayerGameResolver interface {
	AssistPercentage(ctx context.Context, obj *model.PlayerGame) (float64, error)
	Assists(ctx context.Context, obj *model.PlayerGame) (int, error)
	Passes(ctx context.Context, obj *model.PlayerGame) (int, error)
	PotentialAssists(ctx context.Context, obj *model.PlayerGame) (int, error)
	AssistConversionRate(ctx context.Context, obj *model.PlayerGame) (float64, error)
	Date(ctx context.Context, obj *model.PlayerGame) (string, error)
	DefensiveReboundPercentage(ctx context.Context, obj *model.PlayerGame) (float64, error)
	DefensiveRebounds(ctx context.Context, obj *model.PlayerGame) (int, error)
	EffectiveFieldGoalPercentage(ctx context.Context, obj *model.PlayerGame) (float64, error)
	FieldGoalPercentage(ctx context.Context, obj *model.PlayerGame) (float64, error)
	FieldGoalsAttempted(ctx context.Context, obj *model.PlayerGame) (int, error)
	FieldGoalsMade(ctx context.Context, obj *model.PlayerGame) (int, error)
	FreeThrowsAttempted(ctx context.Context, obj *model.PlayerGame) (int, error)
	FreeThrowsMade(ctx context.Context, obj *model.PlayerGame) (int, error)
	FreeThrowsPercentage(ctx context.Context, obj *model.PlayerGame) (float64, error)

	HomeOrAway(ctx context.Context, obj *model.PlayerGame) (string, error)
	Outcome(ctx context.Context, obj *model.PlayerGame) (model.GameOutcome, error)
	Margin(ctx context.Context, obj *model.PlayerGame) (int, error)
	Minutes(ctx context.Context, obj *model.PlayerGame) (string, error)
	OffensiveReboundPercentage(ctx context.Context, obj *model.PlayerGame) (float64, error)
	OffensiveRebounds(ctx context.Context, obj *model.PlayerGame) (int, error)
	Opponent(ctx context.Context, obj *model.PlayerGame) (*model.Team, error)
	OpponentStats(ctx context.Context, obj *model.PlayerGame) (*model.TeamGame, error)
	Team(ctx context.Context, obj *model.PlayerGame) (*model.Team, error)
	TeamStats(ctx context.Context, obj *model.PlayerGame) (*model.TeamGame, error)
	PersonalFoulsDrawn(ctx context.Context, obj *model.PlayerGame) (int, error)
	PersonalFouls(ctx context.Context, obj *model.PlayerGame) (int, error)
	Points(ctx context.Context, obj *model.PlayerGame) (int, error)
	Player(ctx context.Context, obj *model.PlayerGame) (*model.Player, error)

	ThreePointPercentage(ctx context.Context, obj *model.PlayerGame) (float64, error)
	ThreePointersAttempted(ctx context.Context, obj *model.PlayerGame) (int, error)
	ThreePointersMade(ctx context.Context, obj *model.PlayerGame) (int, error)
	Rebounds(ctx context.Context, obj *model.PlayerGame) (int, error)
	TrueShootingPercentage(ctx context.Context, obj *model.PlayerGame) (float64, error)
	Turnovers(ctx context.Context, obj *model.PlayerGame) (int, error)
	Usage(ctx context.Context, obj *model.PlayerGame) (float64, error)
	Blocks(ctx context.Context, obj *model.PlayerGame) (int, error)
	Steals(ctx context.Context, obj *model.PlayerGame) (int, error)
	PointsRebounds(ctx context.Context, obj *model.PlayerGame) (int, error)
	PointsAssists(ctx context.Context, obj *model.PlayerGame) (int, error)
	PointsReboundsAssists(ctx context.Context, obj *model.PlayerGame) (int, error)
	ReboundsAssists(ctx context.Context, obj *model.PlayerGame) (int, error)
	BlocksSteals(ctx context.Context, obj *model.PlayerGame) (int, error)
	FantasyScore(ctx context.Context, obj *model.PlayerGame) (float64, error)
	Prediction(ctx context.Context, obj *model.PlayerGame, input model.ModelInput) (*model.GamePrediction, error)
	Propositions(ctx context.Context, obj *model.PlayerGame, input *model.PropositionFilter) ([]*model.Proposition, error)
}

type PlayerResolver

type PlayerResolver interface {
	Team(ctx context.Context, obj *model.Player) (*model.Team, error)
	Games(ctx context.Context, obj *model.Player, input model.GameFilter) ([]*model.PlayerGame, error)

	Image(ctx context.Context, obj *model.Player) (string, error)
}

type PropositionResolver

type PropositionResolver interface {
	LastModified(ctx context.Context, obj *model.Proposition) (string, error)

	Prediction(ctx context.Context, obj *model.Proposition, input model.ModelInput) (*model.PropPrediction, error)
}

type QueryResolver

type QueryResolver interface {
	Players(ctx context.Context, input *model.PlayerFilter) ([]*model.Player, error)
	Teams(ctx context.Context, input model.TeamFilter) ([]*model.Team, error)
	Games(ctx context.Context, input model.GameFilter) ([]*model.PlayerGame, error)
	Propositions(ctx context.Context, input model.PropositionFilter) ([]*model.Proposition, error)
}

type ResolverRoot

type ResolverRoot interface {
	Player() PlayerResolver
	PlayerGame() PlayerGameResolver
	Proposition() PropositionResolver
	Query() QueryResolver
	Team() TeamResolver
	TeamGame() TeamGameResolver
	Period() PeriodResolver
	PlayerFilter() PlayerFilterResolver
}

type TeamGameResolver

type TeamGameResolver interface {
	Opponent(ctx context.Context, obj *model.TeamGame) (*model.Team, error)
}

type TeamResolver

type TeamResolver interface {
	Players(ctx context.Context, obj *model.Team) ([]*model.Player, error)
	LogoImage(ctx context.Context, obj *model.Team) (string, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL