How to handle offset in tigergraph using built in list vertices endpoint

Hi ,

I want to handle offset using builtin endpoint -List vertices in tigergraph . I do not see any parameter called offset . Should we write custom GSQL query ,just for supporting offset?

Here is the builtin endpoint link , which Iam referring. Built-in Endpoints :: TigerGraph Server

I can see limit parameter but no offset support

Thanks in advance!

Hi @sushmakundapur ,

you can use offset in GSQL Select statement:


Hi @Bruno ,
Thanks for the response , but if I am going to write custom query for list vertices api ,then I need to handle other parameters as well , like FILTER,SELECT .

Now the challenge in writing custom query is to handle FILTER and SELECT parameters dynamically which contains expression . Handling offset and limit is straightforward in custom query.

example : FILTER : “name=abc”
SELECT :" id,name"

Can you please help me to write gsql for dynamically handling FILTER and SELECT.

Sample query for handling limit,offset . But filter and select parameters are yet to be handled
start = SELECT v FROM start -(: e)-: v
ORDER BY v.identifier asc
LIMIT limitValue OFFSET offsetValue;

Can anybody please help me on this thread? Stuck on this issue.

did you tried to use variables?

CREATE QUERY myquery (INT i_limit, INT i_offset, STRING s_filter) FOR GRAPH MyGraph

and then
start = SELECT v FROM start -(: e)-: v
WHERE s_filter
ORDER BY v.identifier asc
LIMIT i_limit OFFSET i_offset;

1 Like