northwesternmutual / grammes

A Go package built to communicate with Apache TinkerPop™ Graph computing framework using Gremlin; a graph traversal language used by graph databases such as JanusGraph®, MS Cosmos DB, AWS Neptune, and DataStax® Enterprise Graph.
Apache License 2.0
125 stars 45 forks source link

VerticesByQuery creates an error on non-primitives datatypes and cardinality set and list #29

Open flashpixx opened 4 years ago

flashpixx commented 4 years ago

I'm using the VerticesByQuery on the GetVertexQuerier to get a model.Vertex of any query, but I get errors if my vertices uses non-primitve datatypes or cardinality list. I'm using Janugraph with UUID and geo-spartial datatypes and also cardinalities list and set. I get the error:

[2020-08-03 11:11:02] - ERROR - retrieving response%!(EXTRA *gremerror.GrammesError={"type":"GRAMMES_ERROR"},{"function":"executeRequest"},{"error":"{"type":"NETWORK_ERROR"},{"status code":"597"},{"error":"SCRIPT EVALUATION ERROR"},{"original error":"Undefined type used in query: uuid"}"})

[2020-08-03 11:11:02] - ERROR - invalid query%!(EXTRA *gremerror.QueryError={"type":"QUERY_ERROR"},{"function":"Vertices"},{"query":"g.V().hasLabel("User").has("uuid","d73e2476-93d3-48e2-88b4-71e773b846ac").limit(1)"},{"error":"{"type":"NETWORK_ERROR"},{"status code":"597"},{"error":"SCRIPT EVALUATION ERROR"},{"original error":"Undefined type used in query: uuid"}"})

[2020-08-03 11:11:02] - ERROR - error gathering vertices%!(EXTRA *gremerror.GrammesError={"type":"GRAMMES_ERROR"},{"function":"VerticesByQuery"},{"error":"{"type":"NETWORK_ERROR"},{"status code":"597"},{"error":"SCRIPT EVALUATION ERROR"},{"original error":"Undefined type used in query: uuid"}"})

If I do the vertex parsing manually by hand I can query it, but not with the vertex.model, so how can I use UUID and geometry datatypes (I think that are strings) and also cardinality set and list?