Gremlin-go cannot bring out props when querying Vertex with Neptune

g := gremlingo.Traversal_().WithRemote(driverRemoteConnection)
    traversal := g.GetGraphTraversal()

    result, err := traversal.V("v-1").Next()
    vertex, err := result.GetVertex()
    fmt.Println(vertex)

when i execute this code, it gots result as picture shows.
In fact, when i use https execute same query, its returns props.
curl --location --request POST 'https://xxx.neptune.amazonaws.com:8182/gremlin' \
--header 'Content-Type: text/plain' \
--data-raw '{"gremlin":"g.V('\''v-1'\'')"}'

response is
{
   
    "result": {
        "data": {
            "@type": "g:List",
            "@value": [
                {
                    "@type": "g:Vertex",
                    "@value": {
                        "id": "v-1",
                        "label": "PERSON",
                        "properties": {
                            "email": [
                                {
                                    "@type": "g:VertexProperty",
                                    "@value": {
                                        "value": "person-1@example.org",
                                        "label": "email"
                                    }
                                }
                            ],
                                }
                            ]
                        }
                    }
                }
            ]
        },
        "meta": {
            "@type": "g:Map",
            "@value": []
        }
    }
}
image.png
Solution
The short answer is that you can get properties on your returned elements after 3.7.0 - https://tinkerpop.apache.org/docs/current/upgrade/#_properties_on_elements (note that the graph database that you are using must also support 3.7.x). If you care about the long answer then you should read this: https://lists.apache.org/thread.html/e959e85d4f8b3d46d281f2742a6e574c7d27c54bfc52f802f7c04af3%40%3Cdev.tinkerpop.apache.org%3E
Was this page helpful?