Search in sources :

Example 1 with MutationMapping

use of org.springframework.graphql.data.method.annotation.MutationMapping in project spring-graphql by spring-projects.

the class SalaryController method updateSalary.

@MutationMapping
public void updateSalary(@Argument("input") SalaryInput salaryInput) {
    String employeeId = salaryInput.getEmployeeId();
    BigDecimal salary = salaryInput.getNewSalary();
    this.salaryService.updateSalary(employeeId, salary);
}
Also used : BigDecimal(java.math.BigDecimal) MutationMapping(org.springframework.graphql.data.method.annotation.MutationMapping)

Aggregations

BigDecimal (java.math.BigDecimal)1 MutationMapping (org.springframework.graphql.data.method.annotation.MutationMapping)1