menuChildren
Requires an authenticated session.
Lists the active submenus of one menu.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query MenuChildren($parentId: ID!) {
menuChildren(parentId: $parentId) {
id
name
createdAt
deletedAt
deletedBy
description
children {
id
name
createdAt
deletedAt
deletedBy
description
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query MenuChildren($parentId: ID!) {\n menuChildren(parentId: $parentId) {\n id\n name\n createdAt\n deletedAt\n deletedBy\n description\n children {\n id\n name\n createdAt\n deletedAt\n deletedBy\n description\n }\n }\n}",
"variables": {
"parentId": "id"
}
}
EOF
Variables:
{
"parentId": "id"
}
Response:
{
"data": {
"menuChildren": [
{
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"deletedAt": "2025-01-15T00:00:00Z",
"deletedBy": "string",
"description": "string",
"children": [
{
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"deletedAt": "2025-01-15T00:00:00Z",
"deletedBy": "string",
"description": "string"
}
]
}
]
}
}
menuChildren(
parentId: ID!
): [Menu!]!
Arguments
menuChildren.parentId ● ID! non-null scalar
The ID of the parent menu.
Type
Menu object
A menu item.