示例#1
0
 public GraphQLQuery(IBioService bioService, IHistoryService historyService)
 {
     Name = "Query";
     FieldAsync <BioType>("Profile", resolve: async context => await bioService.GetBio());
     FieldAsync <ListGraphType <PassionAreaType> >("PassionAreas", resolve: async context => await bioService.GetAllPassionAreas());
     FieldAsync <ListGraphType <AchievementType> >("Achievements", resolve: async context => await historyService.GetAllAchievements());
     FieldAsync <ListGraphType <EmployerType> >("Employers", resolve: async context => await historyService.GetAllEmployers());
 }
 public BioController(IBioService bioContext, IWebHostEnvironment env)
 {
     _bioContext = bioContext;
     _env        = env;
 }