public MatchType(IDream11TeamService teamService) { Field(x => x.MatchId); Field(x => x.Name, true); Field(x => x.SeriesName); Field(x => x.Sport); Field <ListGraphType <TeamType> >("teams", arguments: new QueryArguments(new QueryArgument <IntGraphType> { Name = "id" }), resolve: context => teamService.Get(context.Source.MatchId), description: "Get team matches"); }
public PlayerType(IDream11TeamService teamService) { Field(x => x.PlayerId); Field(x => x.FirstName); Field(x => x.LastName); Field(x => x.Points); Field(x => x.Credits); Field(x => x.TeamId); Field(x => x.Image); Field(x => x.IsCaptain); Field(x => x.IsSelected); Field(x => x.IsViceCaptain); Field(x => x.PlayerRoleName); Field <TeamType>("team", arguments: new QueryArguments(new QueryArgument <IntGraphType> { Name = "id" }), resolve: context => teamService.GetPlayerTeam(context.Source.TeamId), description: "Get player team"); }
public TeamQuery(IDream11TeamService teamService) { Field <ListGraphType <TeamType> >( "teams", resolve: context => teamService.GetAll()); }