Let us again assume that we have a Gremlin query which finds all components of type "Application", with the name "Ardoq":
g.V().has('Application', 'name', 'Ardoq')
If we want to find the components which are reachable from our Ardoq component(s) by following incoming references, we can use the in()-step. When used with no arguments, it changes the current selection to all components which can be reached by following incoming references. The following query returns all components which have a reference to our Ardoq component(s):
g.V().
has('Application', 'name', 'Ardoq').
in()
If we want our search to only return components which have a reference of a specific type to our Ardoq component(s), we can pass the reference type we want to traverse as an argument to the in()-step. The following query finds all components which have a reference of type "Is Realized By" to our Ardoq component(s):
g.V().
has('Application', 'name', 'Ardoq').
in('Is Realized By')
It is also possible to pass multiple reference types to the in()-step if we want the search to only traverse a specific set of incoming references. The following query finds all components which have a reference of type "Is Expert In" or "Owns" to our Ardoq component(s):
g.V().
has('Application', 'name', 'Ardoq').
in('Is Expert In', 'Owns')