pygraphistry icon indicating copy to clipboard operation
pygraphistry copied to clipboard

[FEA] controllable n-hop ranges and cypher syntax parity

Open lmeyerov opened this issue 1 month ago • 1 comments

Is your feature request related to a problem? Please describe.

In question https://github.com/graphistry/pygraphistry/issues/842 , there was discussion of a few n-hop capabilities:

  • specify e(hops_min=m, hops_max=n) (m...n in neo4j) vs current e(hops=n) meaning range 1..n

  • match cypher's default of e(hops=n) being shorthand for n..n (exact)

  • some opt-in way to label nodes/edges by path step(s) they're encountered on

Describe the solution you'd like

  1. e(hops=n) now means n..n <-- breaking change
  2. e(hops_min=m, hops_max=n) now means m..n
  3. Option like e(mark_hops=True) or a globa like chain(...., mark_hops=True), and/or ability to know within one e() or wrt global path length. Very unclear if precedent to build on here.

Additional context

When we add path semantics, this gets even more interesting

lmeyerov avatar Nov 18 '25 05:11 lmeyerov

Also, the labeling can be worked around for typical cases: https://github.com/graphistry/pygraphistry/issues/842#issuecomment-3556177415

lmeyerov avatar Nov 20 '25 06:11 lmeyerov