Skip to main content
Level 3
Nov 23, 2026 3:16 PM UTC
Question

AEM 6.5 GraphQL ignores the Assets console folder order and sorts by path. Can the author-defined order be returned?

 

Authors reorder Content Fragments in an orderable folder in the Assets console. A GraphQL list query with no sort argument returns them alphabetically by path instead.

Example
Folder /content/dam/shop/menu/ with four fragments of one model.

Order set by authors in the console:
1. Starters
2. Mains
3. Desserts
4. Drinks

Query:
query {
  menuItemList(_locale: "en") {
    items { _path title }
  }
}

Order returned:
1. Desserts
2. Drinks
3. Mains
4. Starters

Debug log (com.adobe.cq.dam.cfm.graphql at DEBUG): "No fields to sort" and ORDER BY main.[jcr:path]. The sort argument only works on field values.

Questions
1. Is there a supported way to return fragments in the folder's JCR child order, without adding an order field to the model?
2. Can com.adobe.cq.dam.cfm.graphql.cachedfetcher.ContentFragmentsFetcher (or the hybrid query generator) be extended or overridden, so the generated JCR-SQL2 query doesn't fall back to ORDER BY jcr:path? Is there a supported extension point for this

Thanks!