zabbix-graphql-api/docs/sample_import_host_groups_mutation.graphql
Andreas Hilbig fdfd5f1e0e feat: add comprehensive tests and samples for host and user rights endpoints
- 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.
2026-01-26 16:55:23 +01:00

28 lines
384 B
GraphQL

### Mutation
Use this mutation to import host groups.
```graphql
mutation ImportHostGroups($hostGroups: [CreateHostGroup!]!) {
importHostGroups(hostGroups: $hostGroups) {
groupName
groupid
message
error {
message
code
data
}
}
}
```
### Variables
```json
{
"hostGroups": [
{
"groupName": "ConstructionSite/Test"
}
]
}
```