Assume that we already have a Gremlin query which finds all components in the organization:
If we wish to limit the search to components of a specific type, we can use the hasLabel()-step. The following query limits the search to include all components of type Instrument:
It is also possible to pass multiple component types to the hasLabel()-step. The following query finds all components whose type is either "Person" or "Instrument":
The hasLabel()-step can also be used to filter references based on their type. The following query finds all references whose type is "Likes".