Gremlin Javascript SDK g.V('id') parameters are undefined

114 views
Skip to first unread message

ry...@olmo.io

unread,
Mar 5, 2019, 11:04:22 AM3/5/19
to Gremlin-users
Hey all,

I am utilizing the gremlin javascript sdk and doing a simple query by id to obtain a vertex.

I am getting the following response it shows the properties as undefined when the vertex has properties... is it possible to obtain the properties with this query or do I need to do g.v('id').properties() as well
{ value:
Vertex {
id
: 'bb721c11-df07-4cb5-bf78-9d31820e128b',
label
: 'user',
properties
: undefined },
done: false }

Stephen Mallette

unread,
Mar 7, 2019, 6:48:45 AM3/7/19
to gremli...@googlegroups.com
I'm not sure what versions of things you're using right now, but note that in 3.4.0 we have ReferenceElementStrategy enabled by default:


Also, note that instead of returning graph elements like vertices, you should transform your results to Map or other primitive to get only the data you need and explicitly the data you need. So consider using project() or valueMap() or some other transformation to restructure your result.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/8b254779-79da-4041-a177-682e79a644ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages