Hey Guys,
I am trying a recursive GraphQL query, a la, which returns a tree of permissions,
query {
permission(command: "base"){
...PermissionFields,
children{
...PermissionFields,
children{
...PermissionFields
}
}
}
}
fragment PermissionFields on Permission {
command,
name
}
and getting a result like,
{
"data": {
"permission": {
"name": "System Management",
"command": "base",
"children": [
{
"name": "User Management",
"command": "base/usermanagement",
"children": null
},
{
"name": "Configuration",
"command": "base/pluginconfigs/getconfig",
"children": null
},
{
"name": "Cron Jobs",
"command": "base/cronjobs/index",
"children": null
},
...
whatever I try, I cannot seem to get more than one level of children in my result at a time.
I suspect this may be something wrong with my code (although when I manually re-query at each level, everything looks fine…)
But just on the off chance - is there something inherent in Absinthe that doesn’t like recursive queries like this?
Are there any recursion examples I can look at?