|
@ -102,6 +102,7 @@ type Setting implements Base { |
|
|
config: String! |
|
|
config: String! |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# Tags are attached to one or more documents |
|
|
type Tag implements Base { |
|
|
type Tag implements Base { |
|
|
id: Int! |
|
|
id: Int! |
|
|
createdOn: Date |
|
|
createdOn: Date |
|
@ -109,20 +110,20 @@ type Tag implements Base { |
|
|
key: String! |
|
|
key: String! |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# A User |
|
|
type User implements Base { |
|
|
type User implements Base { |
|
|
id: Int! |
|
|
id: Int! |
|
|
createdOn: Date |
|
|
createdOn: Date |
|
|
updatedOn: Date |
|
|
updatedOn: Date |
|
|
email: String! |
|
|
email: String! |
|
|
provider: String |
|
|
|
|
|
|
|
|
provider: String! |
|
|
providerId: String |
|
|
providerId: String |
|
|
name: String |
|
|
name: String |
|
|
role: UserRole! |
|
|
role: UserRole! |
|
|
groups: [Group] |
|
|
groups: [Group] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# QUERY |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Query (Read) |
|
|
type Query { |
|
|
type Query { |
|
|
comments(id: Int): [Comment] |
|
|
comments(id: Int): [Comment] |
|
|
documents(id: Int, path: String): [Document] |
|
|
documents(id: Int, path: String): [Document] |
|
@ -134,3 +135,31 @@ type Query { |
|
|
tags(key: String): [Tag] |
|
|
tags(key: String): [Tag] |
|
|
users(id: Int, email: String, provider: String, providerId: String, role: UserRole): [User] |
|
|
users(id: Int, email: String, provider: String, providerId: String, role: UserRole): [User] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# Mutations (Create, Update, Delete) |
|
|
|
|
|
type Mutation { |
|
|
|
|
|
assignUserToGroup( |
|
|
|
|
|
userId: Int! |
|
|
|
|
|
groupId: Int! |
|
|
|
|
|
): Boolean |
|
|
|
|
|
createGroup( |
|
|
|
|
|
name: String! |
|
|
|
|
|
): Group |
|
|
|
|
|
createUser( |
|
|
|
|
|
email: String! |
|
|
|
|
|
name: String |
|
|
|
|
|
provider: String! |
|
|
|
|
|
providerId: String |
|
|
|
|
|
role: UserRole! |
|
|
|
|
|
): User |
|
|
|
|
|
deleteGroup( |
|
|
|
|
|
id: Int! |
|
|
|
|
|
): Boolean |
|
|
|
|
|
deleteUser( |
|
|
|
|
|
id: Int! |
|
|
|
|
|
): Boolean |
|
|
|
|
|
removeUserFromGroup( |
|
|
|
|
|
userId: Int! |
|
|
|
|
|
groupId: Int! |
|
|
|
|
|
): Boolean |
|
|
|
|
|
} |