コード例 #1
0
 public TrainingWeekType(ITrainingPlanGraphQLService service)
 {
     Name        = "Training week";
     Description = "Training week description.";
     Field(h => h.Number).Description("Number of the week.");
     Field <ListGraphType <TrainingDayType> >(
         "days",
         resolve: ctx => service.GetDays(ctx.Source.Id)
         );
 }
コード例 #2
0
 public TrainingPlanType(ITrainingPlanGraphQLService service)
 {
     Name        = "Training plan";
     Description = "Training plan description.";
     Field(h => h.Name).Description("The name of training plan.");
     Field <ListGraphType <TrainingWeekType> >(
         "weeks",
         resolve: ctx => service.GetWeeks(ctx.Source.Id)
         );
 }
コード例 #3
0
 public TrainingSessionType(ITrainingPlanGraphQLService service)
 {
     Name        = "Training session";
     Description = "Training session description.";
     Field(h => h.Name).Description("Name of the session.");
     Field(h => h.Number).Description("Number of the session in a day.");
     Field <ListGraphType <ExerciseType> >(
         "exercises",
         resolve: ctx => service.GetExercises(ctx.Source.Id)
         );
 }
コード例 #4
0
 public ExerciseType(ITrainingPlanGraphQLService service)
 {
     Name        = "Exercise";
     Description = "Exercise description.";
     Field(h => h.Name).Description("Name of the exercise.");
     Field(h => h.Number).Description("Number of the exercise in a session.");
     Field <ListGraphType <ExerciseSetType> >(
         "sets",
         resolve: ctx => service.GetSets(ctx.Source.Id)
         );
 }
コード例 #5
0
 public TrainingDayType(ITrainingPlanGraphQLService service)
 {
     Name        = "Training day";
     Description = "Training day description.";
     Field(h => h.Name).Description("Name of the day.");
     Field(h => h.DayOfWeek).Description("Number of the day in a week.");
     Field <ListGraphType <TrainingSessionType> >(
         "sessions",
         resolve: ctx => service.GetSessions(ctx.Source.Id)
         );
 }