How to use vertex as parameter in restpp /gsqlserver/interpreted_query?

30 views
Skip to first unread message

He Chaojie

unread,
Mar 18, 2020, 1:50:32 AM3/18/20
to gsql-users
Hi,

I'm using tiger graph version 2.5.0 enterprise edition. 
I'd like to get all edges connected to a vertex.
Following is the query statement:
INTERPRET QUERY query_test (vertex<address> v) FOR GRAPH test_graph {
  SetAccum<EDGE> @@edgeSetAccum;
  source = {v};
  results=SELECT t FROM source:s-(:e)->:t 
  ACCUM @@edgeSetAccum += e;
  PRINT @@edgeSetAccum;
}

How to send the query by using RESTPP  /gsqlserver/interpreted_query? 
I tried different ways to set the parameter, for example, v="id1", v=id1, v=("id1"), v=(id1), but get following error:
{"version":{"edition":"enterprise","api":"v2","schema":198},"error":true,"message":"Failed to convert address vertex id for parameter v","code":"GSQL-2500"}

Rene Wooller

unread,
Mar 30, 2020, 2:38:01 AM3/30/20
to gsql-users
Hi He,
What's the full curl you're using?

Xinyu Chang

unread,
Mar 30, 2020, 12:28:29 PM3/30/20
to Rene Wooller, gsql-users
v=id1 should be the right way, could you confirm this vertex is in your graph?

Also, it would be helpful if you can post your full query running command here.

Thanks.

Thanks.
Xinyu Chang
Director of Customer Solutions
TigerGraph, Inc.


--
Welcome to GSQL-user group.
- our mission is bringing the power of graph databases to everyone www.opengsql.org
- technical resource can be found here https://docs.tigergraph.com/
---
You received this message because you are subscribed to the Google Groups "gsql-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gsql-users+...@opengsql.org.
To view this discussion on the web visit https://groups.google.com/a/opengsql.org/d/msgid/gsql-users/b7005c5d-db5b-442e-88bb-7e9092f13c1e%40opengsql.org.
Reply all
Reply to author
Forward
0 new messages