feat: navigation, editor improvements + graphql refactor

This commit is contained in:
NGPixel
2018-03-18 23:12:56 -04:00
parent 8462e18fc5
commit 3f0adc5daf
20 changed files with 284 additions and 400 deletions

View File

@@ -95,15 +95,6 @@ type Folder implements Base {
files: [File]
}
type Group implements Base {
id: Int!
createdAt: Date
updatedAt: Date
name: String!
users: [User]
rights: [Right]
}
type Right implements Base {
id: Int!
createdAt: Date
@@ -168,7 +159,6 @@ type Query {
documents(id: Int, path: String): [Document]
files(id: Int): [File]
folders(id: Int, name: String): [Folder]
groups(id: Int, name: String): [Group]
rights(id: Int): [Right]
search(q: String, tags: [String]): [SearchResult]
settings(key: String): [Setting]
@@ -192,11 +182,6 @@ type Mutation {
documentId: Int!
): OperationResult
assignUserToGroup(
userId: Int!
groupId: Int!
): OperationResult
createComment(
userId: Int!
documentId: Int!
@@ -213,10 +198,6 @@ type Mutation {
name: String!
): Folder
createGroup(
name: String!
): Group
createTag(
name: String!
): Tag
@@ -246,10 +227,6 @@ type Mutation {
id: Int!
): OperationResult
deleteGroup(
id: Int!
): OperationResult
deleteTag(
id: Int!
): OperationResult
@@ -306,11 +283,6 @@ type Mutation {
name: String!
): OperationResult
renameGroup(
id: Int!
name: String!
): OperationResult
renameTag(
id: Int!
key: String!
@@ -325,11 +297,6 @@ type Mutation {
rightId: Int!
): OperationResult
removeUserFromGroup(
userId: Int!
groupId: Int!
): OperationResult
resetUserPassword(
id: Int!
): OperationResult

View File

@@ -0,0 +1,69 @@
# ===============================================
# 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 {
operation: ResponseStatus!
group: Group
}
type Group {
id: Int!
name: String!
rights: [String]
users: [User]
createdAt: Date!
updatedAt: Date!
}