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) ); }
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) ); }
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) ); }
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) ); }
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) ); }