Could you please help me to understand whether there is any option where we can skip the optional in the gremlin,
the scenario is, we are traversing through a graph and has an optional statement
depending on a query parameter in the request, I will be having a traverse path for optional, if not, there is no path for the optional
for example,
if query_parameter:
path=has('labeltest').inE().outV()
g.V('test').optional(path)
as optional path is for the query_parameter available condition, this is failing and returning no result if query parameter not available. We don't prefer to repeat the code on the g.v() by an if and else condition. Any thoughts to tell the optional to not do anything or dummy options to return the previous path. Appreciate your thoughts as I am new to this, thank you in advance
Regards Hari