You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# ===============================================
|
|
|
|
# GROUPS
|
|
|
|
# ===============================================
|
|
|
|
|
|
|
|
extend type Query {
|
|
|
|
groups: GroupQuery
|
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
|
|
|
groups: GroupMutation
|
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# QUERIES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type GroupQuery {
|
|
|
|
list(
|
|
|
|
filter: String
|
|
|
|
orderBy: String
|
|
|
|
): [Group]
|
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# MUTATIONS
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type GroupMutation {
|
|
|
|
create(
|
|
|
|
name: String!
|
|
|
|
): GroupResponse
|
|
|
|
|
|
|
|
update(
|
|
|
|
id: Int!
|
|
|
|
name: String!
|
|
|
|
): GroupResponse
|
|
|
|
|
|
|
|
delete(
|
|
|
|
id: Int!
|
|
|
|
): DefaultResponse
|
|
|
|
|
|
|
|
assignUser(
|
|
|
|
groupId: Int!
|
|
|
|
userId: Int!
|
|
|
|
): DefaultResponse
|
|
|
|
|
|
|
|
unassignUser(
|
|
|
|
groupId: Int!
|
|
|
|
userId: Int!
|
|
|
|
): DefaultResponse
|
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# TYPES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type GroupResponse {
|
|
|
|
responseResult: ResponseStatus!
|
|
|
|
group: Group
|
|
|
|
}
|
|
|
|
|
|
|
|
type Group {
|
|
|
|
id: Int!
|
|
|
|
name: String!
|
|
|
|
rights: [String]
|
|
|
|
users: [User]
|
|
|
|
userCount: Int
|
|
|
|
createdAt: Date!
|
|
|
|
updatedAt: Date!
|
|
|
|
}
|