package com.rongyichuang.auth.api; import com.rongyichuang.auth.dto.LoginRequest; import com.rongyichuang.auth.dto.LoginResponse; import com.rongyichuang.auth.service.AuthService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.graphql.data.method.annotation.Argument; import org.springframework.graphql.data.method.annotation.MutationMapping; import org.springframework.stereotype.Controller; /** * 认证GraphQL API */ @Controller public class AuthGraphqlApi { @Autowired private AuthService authService; /** * Web端用户登录 */ @MutationMapping public LoginResponse webLogin(@Argument LoginRequest input) { return authService.login(input); } }