query userRoles

This commit is contained in:
knst-kotov
2021-11-24 12:09:47 +03:00
parent 7dea19495c
commit 0f3ba29fea
4 changed files with 42 additions and 10 deletions

View File

@@ -114,6 +114,7 @@ type Query {
getCurrentUser: UserResult!
getUserBySlug(slug: String!): UserResult!
# rateUser(shout: Int): Int!
userRoles: [Role]!
# messages
getMessages(count: Int = 100, page: Int = 1): [Message!]!
@@ -153,12 +154,27 @@ type Subscription {
############################################ Entities
type Resource {
id: Int!
name: String!
}
type Operation {
id: Int!
name: String!
}
type Permission {
operation_id: Int!
resource_id: Int!
}
type Role {
id: Int!
name: String!
community: Int!
desc: String
permissions: [Int!]!
permissions: [Permission!]!
}
type Rating {
@@ -192,7 +208,6 @@ type User {
links: [String]
emailConfirmed: Boolean # should contain all emails too
muted: Boolean
roles: [Role]
updatedAt: DateTime
wasOnlineAt: DateTime
rating: Int