62 lines
1.2 KiB
GraphQL
62 lines
1.2 KiB
GraphQL
extend type Query {
|
|
"""
|
|
Gets the profile of a user. If no id argument is provided, will return the current authenticated user's profile (as extracted from the authorization header).
|
|
"""
|
|
user(id: String): User
|
|
userPwdStrength( pwd: String! ): JSONObject
|
|
}
|
|
|
|
"""
|
|
Base user type.
|
|
"""
|
|
|
|
type User {
|
|
id: String!
|
|
username: String
|
|
email: String
|
|
name: String
|
|
bio: String
|
|
company: String
|
|
avatar: String
|
|
verified: Boolean
|
|
profiles: JSON
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
|
"""
|
|
Local user login strategy. Disabled if STRATEGY_LOCAL is set to false.
|
|
"""
|
|
userLogin(user: UserLoginInput!): String
|
|
"""
|
|
Local user registration strategy. Disabled if STRATEGY_LOCAL is set to false.
|
|
"""
|
|
userCreate(user: UserCreateInput!): String
|
|
"""
|
|
Endpoint used to create an admin user on server init.
|
|
"""
|
|
userCreateAdmin(user: UserCreateInput!): String
|
|
"""
|
|
Edits a user's profile.
|
|
"""
|
|
userEdit(user: UserEditInput!): Boolean!
|
|
}
|
|
|
|
input UserCreateInput {
|
|
name: String!
|
|
username: String!
|
|
email: String!
|
|
password: String!
|
|
}
|
|
|
|
input UserLoginInput {
|
|
email: String!
|
|
password: String!
|
|
}
|
|
|
|
input UserEditInput {
|
|
name: String
|
|
company: String
|
|
bio: String
|
|
} |