feat(query-optimization): implement GraphQL query optimization and enhance regression suite

- **Optimization**: Implemented automatic Zabbix parameter optimization by analyzing GraphQL selection sets.

- **ZabbixRequest**: Added optimizeZabbixParams with support for skippable parameters and implied field dependencies (e.g., state -> items).

- **Resolvers**: Updated allHosts, allDevices, allHostGroups, and templates to pass requested fields to data sources.

- **Data Sources**: Optimized ZabbixQueryHostsGenericRequest and ZabbixQueryTemplatesRequest to skip unnecessary Zabbix API calls.

- **Regression Tests**: Enhanced RegressionTestExecutor with new tests for optimization (REG-OPT, REG-OPT-NEG), state retrieval (REG-STATE), dependent items (REG-DEP), and empty results (REG-EMPTY).

- **Documentation**: Created query_optimization.md How-To guide and updated roadmap.md, README.md, and tests.md.

- **Bug Fixes**: Fixed deviceType tag assignment during host import and corrected ZabbixCreateHostRequest to support tags.
This commit is contained in:
Andreas Hilbig 2026-02-02 06:23:35 +01:00
parent ad104acde2
commit 97a0f70fd6
16 changed files with 835 additions and 69 deletions

View file

@ -7,6 +7,9 @@ This directory contains detailed guides on how to use and extend the Zabbix Grap
### 🍳 [Cookbook](./cookbook.md)
Practical, step-by-step recipes for common tasks, designed for both humans and AI-based test generation.
### ⚡ [Query Optimization](./query_optimization.md)
Learn how the API optimizes Zabbix requests by reducing output fields and skipping unnecessary parameters based on the GraphQL query.
### 📊 [Schema and Schema Extension](./schema.md)
Learn about the GraphQL schema structure, how Zabbix entities map to GraphQL types, and how to use the dynamic schema extension system.