What happened?
Description
The includeSubfolders parameter in GraphQL does not seem to work when querying assets.
The description of the parameter: Broadens the query results to include assets from any of the subfolders of the folder specified by folderId.
I discovered this on a project I was working on, and confirmed it in a freshly created project.
Steps to reproduce
- Install Craft CMS
- Add asset filesystem and volume
- Make some nested folders, and upload assets
- Setup a GraphQL query:
query MyQuery {
assets(volume: "images", folderId: "4", includeSubfolders: true) {
... on images_Asset {
id
title
}
}
}
Expected behavior
This query should return all the assets in the folder with id 4, as well as assets in any subfolders.
Actual behavior
Only the assets in the folder with id 4 are returned.
Craft CMS version
5.6.14
PHP version
8.3
Operating system and version
No response
Database type and version
mysql 8.0
Image driver and version
No response
Installed plugins and versions
What happened?
Description
The
includeSubfoldersparameter in GraphQL does not seem to work when querying assets.The description of the parameter: Broadens the query results to include assets from any of the subfolders of the folder specified by folderId.
I discovered this on a project I was working on, and confirmed it in a freshly created project.
Steps to reproduce
Expected behavior
This query should return all the assets in the folder with id 4, as well as assets in any subfolders.
Actual behavior
Only the assets in the folder with id 4 are returned.
Craft CMS version
5.6.14
PHP version
8.3
Operating system and version
No response
Database type and version
mysql 8.0
Image driver and version
No response
Installed plugins and versions