mirror of https://github.com/requarks/wiki
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.
99 lines
1.6 KiB
99 lines
1.6 KiB
# ===============================================
|
|
# TREE
|
|
# ===============================================
|
|
|
|
extend type Query {
|
|
tree(
|
|
siteId: UUID!
|
|
parentId: UUID
|
|
parentPath: String
|
|
types: [TreeItemType]
|
|
limit: Int
|
|
offset: Int
|
|
orderBy: TreeOrderBy
|
|
orderByDirection: OrderByDirection
|
|
depth: Int
|
|
includeAncestors: Boolean
|
|
): [TreeItem]
|
|
}
|
|
|
|
extend type Mutation {
|
|
createFolder(
|
|
siteId: UUID!
|
|
parentId: UUID
|
|
pathName: String!
|
|
title: String!
|
|
): DefaultResponse
|
|
deleteFolder(
|
|
folderId: UUID!
|
|
): DefaultResponse
|
|
duplicateFolder(
|
|
folderId: UUID!
|
|
targetParentId: UUID
|
|
targetPathName: String!
|
|
targetTitle: String!
|
|
): DefaultResponse
|
|
moveFolder(
|
|
folderId: UUID!
|
|
targetParentId: UUID
|
|
): DefaultResponse
|
|
renameFolder(
|
|
folderId: UUID!
|
|
pathName: String
|
|
title: String
|
|
): DefaultResponse
|
|
}
|
|
|
|
# -----------------------------------------------
|
|
# TYPES
|
|
# -----------------------------------------------
|
|
|
|
enum TreeItemType {
|
|
asset
|
|
folder
|
|
page
|
|
}
|
|
|
|
enum TreeOrderBy {
|
|
createdAt
|
|
fileName
|
|
title
|
|
updatedAt
|
|
}
|
|
|
|
type TreeItemFolder {
|
|
id: UUID
|
|
childrenCount: Int
|
|
depth: Int
|
|
fileName: String
|
|
folderPath: String
|
|
title: String
|
|
}
|
|
|
|
type TreeItemPage {
|
|
id: UUID
|
|
createdAt: Date
|
|
depth: Int
|
|
fileName: String
|
|
folderPath: String
|
|
editor: String
|
|
pageType: String
|
|
title: String
|
|
updatedAt: Date
|
|
}
|
|
|
|
type TreeItemAsset {
|
|
id: UUID
|
|
createdAt: Date
|
|
depth: Int
|
|
fileName: String
|
|
# In Bytes
|
|
fileSize: Int
|
|
fileType: String
|
|
folderPath: String
|
|
title: String
|
|
updatedAt: Date
|
|
}
|
|
|
|
union TreeItem = TreeItemFolder | TreeItemPage | TreeItemAsset
|