-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Describe the feature request
Summary
Add support for discovering and filtering available toggles based on tags to enable better toggle organization and selective loading capabilities.
Problem Description
Currently, the unleash-proxy-client doesn't provide a way to:
- Discover what toggles are available without loading all of them
- Filter toggles based on tags
- Load toggles selectively based on tag criteria
- Understand toggle categorization through tags
This limitation makes it difficult to:
- Implement efficient lazy loading strategies based on feature areas
- Organize toggles by tags (e.g., 'purchase', 'mobile', 'experiment')
- Load only relevant toggles for specific contexts or components
Proposed Solution
Add discovery and filtering capabilities to allow querying toggles by tags without loading all toggle values.
Background
As applications grow and adopt more feature toggles, several critical problems emerge:
-
Scale Management Crisis: Organizations often have hundreds or thousands of feature toggles across different projects, teams, and environments. Without proper discovery mechanisms, developers lose track of what toggles exist and which ones are relevant to their work.
-
Performance Impact at Scale: Loading all toggles becomes a significant performance bottleneck as the number of feature flags grows. A typical enterprise application might have 200+ toggles, but a specific page or component might only need 5-10 of them.
-
Wasted Resources: Current all-or-nothing approach leads to:
- Unnecessary network bandwidth consumption
- Increased memory usage on client devices
- Slower application startup times
- Higher server load serving unused toggle data
Solution suggestions
// Get all toggles with specific tag
const frontendToggles = await unleash.fetchTogglesByTags(['frontend']);
// Get toggles with multiple tags (AND operation - toggle must have ALL tags)
const mobileExperiments = await unleash.fetchTogglesByTags(['mobile', 'experiment']);
// Get toggles with any of the specified tags (OR operation)
const uiToggles = await unleash.fetchTogglesByTags(['ui', 'theme'], { operation: 'OR' });
Metadata
Metadata
Assignees
Labels
Type
Projects
Status