| | |
| | | |
| | | import com.rongyichuang.judge.dto.request.JudgeInput; |
| | | import com.rongyichuang.judge.dto.response.JudgeResponse; |
| | | import com.rongyichuang.judge.dto.response.JudgeStatsResponse; |
| | | import com.rongyichuang.judge.service.JudgeService; |
| | | import com.rongyichuang.common.dto.request.MediaInput; |
| | | import com.rongyichuang.common.dto.response.MediaResponse; |
| | | import com.rongyichuang.common.service.MediaService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.graphql.data.method.annotation.Argument; |
| | | import org.springframework.graphql.data.method.annotation.MutationMapping; |
| | | import org.springframework.graphql.data.method.annotation.QueryMapping; |
| | |
| | | return judgeService.findById(id); |
| | | } |
| | | |
| | | @QueryMapping |
| | | public JudgeStatsResponse judgeStats() { |
| | | return judgeService.getJudgeStats(); |
| | | } |
| | | |
| | | @MutationMapping |
| | | public JudgeResponse saveJudge(@Argument JudgeInput input) { |
| | | return judgeService.save(input); |