Skip to content
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

Shortest path: filtering nodes by index #2350

Closed
lapwat opened this issue Apr 20, 2018 · 1 comment
Closed

Shortest path: filtering nodes by index #2350

lapwat opened this issue Apr 20, 2018 · 1 comment
Labels
exp/intermediate Fixing this requires some experience with the project. kind/enhancement Something could be better.

Comments

@lapwat
Copy link

lapwat commented Apr 20, 2018

Hello everyone,

Is it possible to filter a node in 'shortest path' query depending of its postion in the path ? I need to filter the predicate of the first node of the path (node after the first hop).

Something like:

{
  path as shortest(from: 0x1234, to: 0xabcd) {
    edge @filter(index(1, eq(name, "Bob")))
  }
  path(func: uid(path)) {
    uid
  }
}

I would love to see it implemented.
Thanks a lot,
lapwat

@lapwat lapwat changed the title Shortest path, filtering nodes by index Shortest path: filtering nodes by index Apr 20, 2018
@pawanrawal pawanrawal added the kind/enhancement Something could be better. label Apr 22, 2018
@manishrjain manishrjain added the exp/intermediate Fixing this requires some experience with the project. label Jan 16, 2019
@campoy campoy removed area/querylang/algos Related to graph algorithms, such as k-shortest path. labels Jul 11, 2019
@campoy
Copy link
Contributor

campoy commented Jul 12, 2019

The way to do this is by using first: 1, offset: 1 but unfortunately there's an issue with this feature.
I filed #3663 to track that fix, so we can close this issue.

@campoy campoy closed this as completed Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/intermediate Fixing this requires some experience with the project. kind/enhancement Something could be better.
Development

No branches or pull requests

4 participants