Skip to content

Is there a way to obtain the inV and outV properties of an Edge? #1747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gregorvilkner opened this issue Oct 7, 2024 · 1 comment
Open

Comments

@gregorvilkner
Copy link

gregorvilkner commented Oct 7, 2024

I'd like to get the id's of the nodes connected by an edge - just by calling g.E().hasLabel('someLabel'). Is that possible?

@tomiasp
Copy link

tomiasp commented Apr 15, 2025

We are using this to filter outgoing edges from a vertex, should apply for you as well

g.V<Employee>()
            .OutE<Fills>().Where(e => e.InV<Position>().Where(e => e.Id == position.Id))

So filtering the Edge with a Where clause gives you the Edge and then you can use InV() or OutV() methods to filter the vertex IDs coming in or going out.

In your case, I guess you should be able to use the InV().Properties() approach to get a list of IDs, probably need to Fold() as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants