示例#1
0
 public EngagementQuery(IEngagementLogic engagementLogic)
 {
     FieldAsync <EngagementType>(
         "engagementByIds",
         arguments: new QueryArguments(new QueryArgument <IntGraphType>
     {
         Name = "phaseId"
     }, new QueryArgument <IntGraphType>
     {
         Name = "studentId"
     }),
         resolve: async context => { return(await engagementLogic.GetById(context.GetArgument <int>("phaseId"), context.GetArgument <int>("studentId"))); }
         );
     FieldAsync <ListGraphType <EngagementType> >(
         "engagementByPhase",
         arguments: new QueryArguments(new QueryArgument <IntGraphType>
     {
         Name = "phaseId"
     }),
         resolve: async context => { return(await engagementLogic.GetByPhase(context.GetArgument <int>("phaseId"))); }
         );
 }