Exemplo n.º 1
0
 public InspectionMutation(IInspectionRepository inspectionRepository)
 {
     Field <InspectionType>(
         "CreateInspection",
         arguments: new QueryArguments(
             new QueryArgument <NonNullGraphType <InspectionInputType> > {
         Name = "newInspection", Description = "New contract to be added"
     }),
         resolve: context =>
     {
         var contract = context.GetArgument <Inspection>("newInspection");
         return(inspectionRepository.Create(contract));
     });
 }