I am using Amazon Neptune engine version 1.1.1.0 and I am trying to execute below query
g.E().has(id, '6529056485837422516').fold().coalesce(unfold().property('id','6529056485837422516').property('createdat', 1553676114).property('status', 0).property('edgeproperty', 'connects').property('source', '63').property('destination', '54'),g.V('54').addE('connects').to(__.V('63')).property(id,'6529056485837422516').property('id','6529056485837422516').property('createdat', 1553676114).property('status', 0).property('edgeproperty', 'connects').property('source', '63').property('destination', '54'))
I am executing this query from my gremlin console and after executing this I am getting error like below {"detailedMessage":"The child traversal of [GraphStep(vertex,[54]), AddEdgeStep({label=[connects], createdat=[1553676114], edgeproperty=[connects], ~to=[[GraphStep(vertex,[63])]], destination=[54], id=[6529056485837422516], id=[6529056485837422516], source=[63], status=[0]})] was not spawned anonymously - use the __ class rather than a TraversalSource to construct the child traversal","code":"InternalFailureException","requestId":"ceee889e-c382-4bde-ad91-86ea1cb010c1"}
But If I am adding edge separately with below query then I am able to add edge
g.V('54').addE('connects').to(__.V('63')).property(id,'6529056485837422516').property('id','6529056485837422516').property('createdat', 1553676114).property('status', 0).property('edgeproperty', 'connects').property('source', '63').property('destination', '54')
Even if I am able to update edge with below query then also I am able to update
g.E().has(id, '6529056485837422516').fold().coalesce(unfold().property('id','6529056485837422516').property('createdat', 1553676114).property('status', 0).property('edgeproperty', 'connects').property('source', '63').property('destination', '54'))
but if I am trying to update or add same time by using fold(). coalesce() then I am getting error as not spawned anonymously - use the __ class rather than a TraversalSource.
Please help me how to solve this error