descendants
Command
The descendants
command selects all descendants of nodes returned in a query.
Usage
descendants [--with-origin] <edge_type>
Parameters
Parameter | Description | Required? | Default Value |
---|---|---|---|
edge_type | Edge type by which to traverse | ❌ | delete |
Options
Option | Description | Required? |
---|---|---|
--with-origin | Include current element in the result set | ❌ |
Examples
Equivalent to query is(aws_region) -[1:]->
> search is(aws_region) | descendants
Equivalent to query is(aws_region) -[0:]->
> search is(aws_region) | descendants --with-origin
> search is(volume_type) limit 1 | descendants --with-origin
kind=gcp_disk_type, name=pd-standard, age=52yr1mo, cloud=gcp, account=sre, region=us-central1, zone=us-central1-a
kind=gcp_disk, id=881, name=disk-1, age=1yr2mo, cloud=gcp, account=sre, region=us-central1, zone=us-central1-a