Skip to content

Add DotFolderByPath GraphQL root query for folder tree browsing #34692

@fmontes

Description

@fmontes

Description

Currently, folders in dotCMS GraphQL are only accessible as nested fields on contentlets (via the DotFolder type and FolderFieldDataFetcher). There is no way to query folders directly as a top-level query.

Add a DotFolder root query that returns the folder at a given path with recursive sub-folder traversal through a children field — enabling full folder tree browsing via GraphQL.

Expected usage:

query {
  DotFolder(path: "/application/") {
    folderTitle
    folderPath
    children {
      folderTitle
      folderPath
      children {
        folderTitle
        folderPath
      }
    }
  }
}

Acceptance Criteria

  • DotFolder(path: String!) root query exists in the GraphQL schema
  • Returns the single folder at the given path (not a flat list of all sub-folders)
  • Sub-folders are accessible via the recursive children field
  • Nested children queries work to arbitrary depth (up to configurable max)
  • Returns null when folder path does not exist
  • Respects user permissions
  • Max recursion depth is configurable
  • Unit tests pass
  • Integration tests verify schema structure

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions