Beispiel #1
0
 public ReportQuery()
 {
     Field <ReportType>(
         name: "report",
         arguments: new QueryArguments(new QueryArgument <IntGraphType> {
         Name = "id",
     }),
         resolve: context =>
     {
         int id = context.GetArgument <int>("id");
         return(_repo.GetReportById(id));
     });
     Field <ListGraphType <ColumnType> >(
         name: "columns",
         arguments: new QueryArguments(new QueryArgument <IntGraphType> {
         Name = "id"
     }),
         resolve: context =>
     {
         int id = context.GetArgument <int>("id");
         return(_repo.GetColumnsByReport(id));
     }
         );
 }