predecessors
Command
The predecessors
command selects all predecessors of nodes returned in a query.
Usage
predecessors [--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) <--
> search is(aws_region) | predecessors
Equivalent to query is(aws_region) <-[0:1]-
> search is(aws_region) | predecessors --with-origin
> search is(volume) and volume_status=available | predecessors | query is(volume_type)
kind=gcp_disk_type, name=pd-standard, age=2yr1mo, cloud=gcp, account=eng, region=us-central1, zone=us-central1-a
kind=gcp_disk_type, name=pd-standard, age=2yr1mo, cloud=gcp, account=sre, region=us-central1, zone=us-central1-a
kind=aws_ec2_volume_type, name=gp2, age=5d8h, cloud=aws, account=sales, region=us-west-2