zabbix-graphql-api/src/datasources/graphql-params-to-zabbix-output.ts
Andreas Hilbig b646b8c606 feat: optimize Zabbix queries and enhance specialized device support
- Implement query optimization (reduced output, parameter skipping) to minimize Zabbix API traffic.

- Add indirect dependency handling: deviceType implies tags and state implies items.

- Move schema extensions to samples/extensions/ to clarify their role as samples.

- Enhance DistanceTrackerDevice with String time fields to support optional date portions.

- Ensure allDevices strictly filters by deviceType and populates the field in results.

- Refactor runAllRegressionTests mutation to use internal unique names and improve stability.

- Fix unnecessary Zabbix API calls for item preprocessing during template and host imports.

- Update documentation including cookbook recipes, test specifications, and optimization guides.

- Add extensive unit, integration, and regression tests covering all implemented changes.

- Update docker-compose.yml to mount the samples/ directory as a volume.

- Update IntelliJ .idea run configurations to reflect the new sample extension paths.
2026-02-02 13:20:06 +01:00

20 lines
599 B
TypeScript

import {GraphQLResolveInfo} from "graphql";
import {getRequestedFields} from "../api/graphql_utils.js";
export class GraphqlParamsToNeededZabbixOutput {
static mapAllHosts(info: GraphQLResolveInfo): string[] {
return getRequestedFields(info);
}
static mapAllDevices(info: GraphQLResolveInfo): string[] {
return getRequestedFields(info);
}
static mapAllHostGroups(info: GraphQLResolveInfo): string[] {
return getRequestedFields(info);
}
static mapTemplates(info: GraphQLResolveInfo): string[] {
return getRequestedFields(info);
}
}