lrj
5 小时以前 bec58fa7fe4fae2deac88200d8d939e12ec8a08f
backend/src/main/resources/graphql/auth.graphqls
@@ -1,53 +1,78 @@
extend type Mutation {
    "Web端用户登录"
    webLogin(input: LoginRequest): LoginResponse
extend type Query {
    # 这个文件主要是 mutation, 所以 query 可能是空的
    _: Boolean
}
"登录请求"
extend type Mutation {
    webLogin(input: LoginRequest!): LoginResponse
    wxLogin(input: WxLoginRequest!): WxLoginResponse
    decryptPhoneNumber(encryptedData: String!, iv: String!, sessionKey: String!): PhoneDecryptResponse
    getPhoneNumberByCode(code: String!): PhoneDecryptResponse
}
input LoginRequest {
    phone: String!
    password: String!
}
"登录响应"
type LoginResponse {
    token: String!
    userInfo: UserInfo!
input WxLoginRequest {
    code: String
    wxOpenid: String
    wxUnionid: String
    phone: String
    loginIp: String
    deviceInfo: String
    phoneAuthorized: Boolean
    sessionKey: String
}
"用户信息"
type LoginResponse {
    token: String
    userInfo: UserInfo
}
type WxLoginResponse {
    token: String
    userInfo: UserInfo
    isNewUser: Boolean
    loginRecordId: Long
    sessionKey: String
}
type UserInfo {
    userId: ID!
    name: String!
    phone: String!
    userType: String!
    userId: Long
    name: String
    phone: String
    userType: String
    employee: EmployeeInfo
    judge: JudgeInfo
    player: PlayerInfo
}
"员工信息"
type EmployeeInfo {
    id: ID!
    name: String!
    roleId: String!
    id: Long
    name: String
    roleId: String
    description: String
}
"评委信息"
type JudgeInfo {
    id: ID!
    name: String!
    id: Long
    name: String
    title: String
    company: String
    description: String
}
"学员信息"
type PlayerInfo {
    id: ID!
    name: String!
    id: Long
    name: String
    phone: String
    description: String
    auditState: Int
}
type PhoneDecryptResponse {
    phoneNumber: String
    purePhoneNumber: String
    countryCode: String
}