- Added GraphQL sample queries and mutations for host and user rights endpoints in the 'docs' directory. - Implemented unit tests for all remaining GraphQL endpoints, including hosts, devices, host groups, locations, and user permissions. - Created dedicated integration tests for host and user rights workflows, utilizing the new sample files. - Fixed a bug in 'HostImporter.getHostGroupHierarchyNames' to correctly process and sort nested host group hierarchies. - Refined Zabbix API mocking in tests to improve reliability and support path-based routing. - Verified all 38 tests across 11 suites pass successfully.
21 lines
355 B
GraphQL
21 lines
355 B
GraphQL
### Query
|
|
Use this query to list all devices (hosts with device type and state).
|
|
|
|
```graphql
|
|
query AllDevices($name_pattern: String, $with_items: Boolean) {
|
|
allDevices(name_pattern: $name_pattern, with_items: $with_items) {
|
|
hostid
|
|
host
|
|
name
|
|
deviceType
|
|
}
|
|
}
|
|
```
|
|
|
|
### Variables
|
|
```json
|
|
{
|
|
"name_pattern": "%",
|
|
"with_items": true
|
|
}
|
|
```
|