50 lines
914 B
GraphQL
50 lines
914 B
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
|
|
userSearchResults(query: String, limit: Int! = 100): [UserSearchResult!]!
|
|
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: JSONObject
|
|
role: String
|
|
}
|
|
|
|
type UserSearchResult {
|
|
id: String!
|
|
username: String
|
|
name: String
|
|
bio: String
|
|
company: String
|
|
avatar: String
|
|
verified: Boolean
|
|
profiles: JSONObject
|
|
role: String
|
|
}
|
|
|
|
extend type Mutation {
|
|
"""
|
|
Edits a user's profile.
|
|
"""
|
|
userEdit(user: UserEditInput!): Boolean!
|
|
}
|
|
|
|
input UserEditInput {
|
|
name: String
|
|
company: String
|
|
bio: String
|
|
}
|