feat: fetch page tree resolver
This commit is contained in:
@@ -40,6 +40,12 @@ type PageQuery {
|
||||
): Page @auth(requires: ["manage:pages", "delete:pages", "manage:system"])
|
||||
|
||||
tags: [PageTag]! @auth(requires: ["manage:system", "read:pages"])
|
||||
|
||||
tree(
|
||||
parent: Int!
|
||||
mode: PageTreeMode!
|
||||
locale: String!
|
||||
): [PageTreeItem] @auth(requires: ["manage:system", "read:pages"])
|
||||
}
|
||||
|
||||
# -----------------------------------------------
|
||||
@@ -182,6 +188,19 @@ type PageListItem {
|
||||
tags: [String]
|
||||
}
|
||||
|
||||
type PageTreeItem {
|
||||
id: Int!
|
||||
path: String!
|
||||
depth: Int!
|
||||
title: String!
|
||||
isPrivate: Boolean!
|
||||
isFolder: Boolean!
|
||||
privateNS: String
|
||||
parent: Int
|
||||
pageId: Int
|
||||
locale: String!
|
||||
}
|
||||
|
||||
enum PageOrderBy {
|
||||
CREATED
|
||||
ID
|
||||
@@ -194,3 +213,9 @@ enum PageOrderByDirection {
|
||||
ASC
|
||||
DESC
|
||||
}
|
||||
|
||||
enum PageTreeMode {
|
||||
FOLDERS
|
||||
PAGES
|
||||
ALL
|
||||
}
|
||||
|
Reference in New Issue
Block a user