To query hierarchy levels, use the hierarchyLevels
query.
Access policy:
- The API user context must have permission to view hierarchy levels.
- Results are filtered based on the user’s context and permissions.
The query accepts the following arguments:
Argument | Type | Description | Default |
---|
hierarchyLevelId | ID | Optional. Specific hierarchy level ID to retrieve. If omitted, returns all accessible levels. | — |
Object description:
The hierarchyLevels
query returns HierarchyLevel
objects with the following structure:
Field | Type | Description |
---|
id | ID! | The unique identifier of the hierarchy level. |
label | String! | The display name of the hierarchy level. |
depth | Int! | The depth of this level in the hierarchy tree (root = 0). |
parent | HierarchyLevel | The parent hierarchy level, if any. |
children | [HierarchyLevel] | The children hierarchy levels, if any. |
When hierarchyLevelId
is provided, the query returns detailed information about that specific level including its parent relationship.
query hierarchyLevels {
hierarchyLevels(hierarchyLevelId: 8){
id
label
depth
parent{
id
}
children {
id
label
}
}
}