Пример #1
0
 public SkillQuery(ISkillLogic skillLogic)
 {
     FieldAsync <SkillType>(
         "skillById",
         arguments: new QueryArguments(new QueryArgument <IntGraphType>
     {
         Name = "id"
     }),
         resolve: async context => { return(await skillLogic.GetById(context.GetArgument <int>("id"))); }
         );
     FieldAsync <ListGraphType <SkillType> >(
         "skillsByPhase",
         arguments: new QueryArguments(new QueryArgument <IntGraphType>
     {
         Name = "phaseId"
     }),
         resolve: async context => { return(await skillLogic.GetByPhase(context.GetArgument <int>("phaseId"))); }
         );
 }
Пример #2
0
 public PhaseType(ISkillLogic skillLogic, IEngagementLogic engagementLogic)
 {
     Field(x => x.ProjectID);
     Field(x => x.DocumentID);
     Field(x => x.PhaseID);
     Field(x => x.StartDate);
     Field(x => x.Name);
     Field(x => x.Description);
     Field(x => x.Duration);
     FieldAsync <ListGraphType <SkillType> >("requiredSkills", resolve: async context => { return(await skillLogic.GetByPhase(context.Source.PhaseID)); });
     FieldAsync <ListGraphType <EngagementType> >("engagements", resolve: async context => { return(await engagementLogic.GetByPhase(context.Source.PhaseID)); });
 }