© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Apache TinkerPopAT
Apache TinkerPop•3y ago•
9 replies
Dinh Phu

Query if else in gremlin

I have a query and that return a list vertex. I want to do a query from those vertexes like this (if - else):
- vertex doesn't has out edge -> return itself
- vertex has out edge -> then keep querying until there are no edges out ( repeat(out()).until(outE().count().is(0)) )
I'm trying to limit the use of loops here to improve performance. Who can help me.
Thank you very much
Apache TinkerPop banner
Apache TinkerPopJoin
Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.
1,376Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

@GremlinDSL support in the GremlinLangScriptEngine
Apache TinkerPopATApache TinkerPop / questions
3y ago
Default Sort Order in Gremlin Query
Apache TinkerPopATApache TinkerPop / questions
3y ago
Gremlin Query timeout issue
Apache TinkerPopATApache TinkerPop / questions
12mo ago
Neo4j Chypre convention in to gremlin query
Apache TinkerPopATApache TinkerPop / questions
15mo ago