Github user spmallette commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/882#discussion_r207197353 --- Diff: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java --- @@ -2451,6 +2452,24 @@ else if (value instanceof Traversal) return this.asAdmin().addStep((Step<E, E>) new PeerPressureVertexProgramStep(this.asAdmin())); } + /** + * Executes a Shortest Path algorithm over the graph. + * + * @return the traversal with the appended {@link ShortestPathVertexProgramStep} + * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#shortestpath-step" target="_blank">Reference Documentation - ShortestPath Step</a> + */ + public default GraphTraversal<S, Path> shortestPath() { + if (this.asAdmin().getEndStep() instanceof GraphStep) { --- End diff -- So, what does this mean exactly? Like, if you did `g.V().has('name','marko')` it wouldn't filter "marko" vertex without you throwing an `identity()` in there?
---