Affected Version
2026.2
Affected capability
DataHub
Steps to reproduce
- Pimcore 2026.2 with
pimcore/data-hub, a GraphQL endpoint configured with the Document schema enabled.
- Create a document folder, e.g.
/shared.
- Query that folder by its full path:
{
getDocument(fullpath: "/shared") {
... on document_folder {
id
fullpath
}
}
}
The same happens whenever a document folder is reached through a relation, a document/object property or an editable relation (AnyDocumentTarget / AnyTarget).
Actual Behavior
The query fails at runtime:
Abstract type Document must resolve to an Object type at runtime for field Query.getDocument ... received null
DocumentType::resolveType() has no branch for Document\Folder and returns null, and _document_folder — although it is a registered type — is not a member of the document union returned by DocumentType::getTypes(). So the union can neither resolve nor accept a document folder.
For object folders the equivalent case already works (_object_folder); only documents are affected.
Expected Behavior
getDocument() on a folder path returns the folder as document_folder, and document folders reached through relations/properties resolve to the registered _document_folder type. Non-folder documents stay unaffected.
Additional notes
Fix is prepared in pimcore/data-hub#1126 (adds _document_folder to the document union and resolves Document\Folder to it; includes a regression test). It complements the resolveType() folder guards merged with pimcore/data-hub#1105 — both halves are needed for the document-folder case.
This issue is created as the tracking issue required by the issue-link guardrail for that PR.
Affected Version
2026.2
Affected capability
DataHub
Steps to reproduce
pimcore/data-hub, a GraphQL endpoint configured with the Document schema enabled./shared.{ getDocument(fullpath: "/shared") { ... on document_folder { id fullpath } } }The same happens whenever a document folder is reached through a relation, a document/object property or an editable relation (
AnyDocumentTarget/AnyTarget).Actual Behavior
The query fails at runtime:
DocumentType::resolveType()has no branch forDocument\Folderand returnsnull, and_document_folder— although it is a registered type — is not a member of thedocumentunion returned byDocumentType::getTypes(). So the union can neither resolve nor accept a document folder.For object folders the equivalent case already works (
_object_folder); only documents are affected.Expected Behavior
getDocument()on a folder path returns the folder asdocument_folder, and document folders reached through relations/properties resolve to the registered_document_foldertype. Non-folder documents stay unaffected.Additional notes
Fix is prepared in pimcore/data-hub#1126 (adds
_document_folderto thedocumentunion and resolvesDocument\Folderto it; includes a regression test). It complements theresolveType()folder guards merged with pimcore/data-hub#1105 — both halves are needed for the document-folder case.This issue is created as the tracking issue required by the issue-link guardrail for that PR.