123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- # ===============================================
- # TREE
- # ===============================================
- extend type Query {
- """
- Browse the tree.
- Must provide either `parentId` or a combination of `parentPath` and `locale`.
- """
- tree(
- siteId: UUID!
- parentId: UUID
- parentPath: String
- locale: String
- types: [TreeItemType]
- limit: Int
- offset: Int
- orderBy: TreeOrderBy
- orderByDirection: OrderByDirection
- """
- How many levels of children to include. Defaults to 1.
- """
- depth: Int
- """
- Include all parent folders up to root
- """
- includeAncestors: Boolean
- """
- Include all folders at root level
- """
- includeRootFolders: Boolean
- ): [TreeItem]
- folderById(
- id: UUID!
- ): TreeItemFolder
- folderByPath(
- siteId: UUID!
- locale: String!
- path: String!
- ): TreeItemFolder
- }
- extend type Mutation {
- createFolder(
- siteId: UUID!
- locale: String!
- parentId: UUID
- parentPath: String
- 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
- }
- interface TreeItem {
- id: UUID
- folderPath: String
- fileName: String
- title: String
- }
- type TreeItemFolder implements TreeItem {
- id: UUID
- childrenCount: Int
- depth: Int
- fileName: String
- folderPath: String
- title: String
- isAncestor: Boolean
- }
- type TreeItemPage implements TreeItem {
- id: UUID
- createdAt: Date
- depth: Int
- fileName: String
- folderPath: String
- editor: String
- pageType: String
- title: String
- updatedAt: Date
- }
- type TreeItemAsset implements TreeItem {
- id: UUID
- createdAt: Date
- depth: Int
- fileName: String
- # In Bytes
- fileSize: Int
- fileExt: String
- mimeType: String
- folderPath: String
- title: String
- updatedAt: Date
- }
|