Skip to content

Conversation

@martastain
Copy link
Member

@martastain martastain commented Dec 5, 2025

This pull request adds support for filtering folders by associated tasks in the get_folders GraphQL resolver. The main change introduces a new task_filter argument, allowing clients to specify task-based criteria for folder retrieval. The implementation parses the filter, constructs a SQL Common Table Expression (CTE) to select relevant folders, and joins this with the folders query, ensuring only folders with matching tasks are returned.

image

Folder search endpoint

Added new endpoint [POST] /api/projects/{projectname}/folders/search that enables searching for folder ids matching given criteria (taskFilter, folderFilter, taskSearch, folderSearch). mimicking graphql folder resolver. This endpoint deprecates taskFolders endpoint that does the same, but with limited functionality

image

@martastain martastain self-assigned this Dec 5, 2025
@martastain martastain added the type: enhancement Improvement of existing functionality or minor addition label Dec 5, 2025
@martastain martastain linked an issue Dec 5, 2025 that may be closed by this pull request
@martastain martastain requested a review from Innders December 5, 2025 09:35
@Innders
Copy link
Member

Innders commented Dec 5, 2025

I just realised that we don't use folders graphql resolver for the products page but we use /folders endpoint. Can this also be added an argument to that endpoint as well?

@martastain
Copy link
Member Author

I just realised that we don't use folders graphql resolver for the products page but we use /folders endpoint. Can this also be added an argument to that endpoint as well?

Unfortunatelly no. /folders endpoint uses cached hierarchy so only filtering that happens there is for ACL. The endpoint does not use SQL at all, so we cannot use SQLFilter.

@martastain martastain changed the title GraphQL: taskFilter for folders resolver Improved folder filtering Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GraphQL: Filter folders by tasks

3 participants