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

66 Views Asked by At

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. https://docs.tigergraph.com/tigergraph-server/current/api/built-in-endpoints#_list_vertices

Thanks in advance!

1

There are 1 best solutions below

0
On

That is correct. Unfortunately the current built-in list vertices endpoint doesn't include an offset flag https://docs.tigergraph.com/tigergraph-server/current/api/built-in-endpoints#_list_vertices

List Vertices Parameters:

count_only Takes a boolean value. If the value is true, the results field will only contain the count of how many vertices were selected. Default is false.

select Attributes of the selected vertices to return. The parameter takes a list, which is a string of comma-separated values, and will only return the attributes that are provided.

filter Conditions used to filter the returned vertices. The parameter takes a list of conditions, which is a string of comma-separated values. If any filter conditions are provided, the endpoint will only return the vertices that satisfy the conditions. Six comparison operators are supported for this parameter: =, !=, >, >=, < and <=. If the value on the right side of an operator is a string literal, it should be enclosed in double-quotes.

limit Integer value that specifies the total number of vertices to return

sort Attributes to sort the results by. The parameter takes a list, which is a string of comma-separated values, and will sort the returned vertices based on the attributes provided in the list in order. Add "-" in front of the attribute to sort in descending order.

timeout Integer that specifies the number of seconds after which the query will time out. If the parameter is set to 0 or isn’t provided, the system-wide endpoint timeout setting is applied.