Using value variables for offset

Mirror of:


 var(func: eq(account, "100")){
       cid as uid  
   msg as message_limit
 messageCount(func: uid(cid)){
   messages(orderdesc: timestamp, offset: val(msg)){

message_limit here is message_limit:int ..
The essential point is that I want to be able to set values in the database to use as limits application side. The above results in : strconv.ParseInt: parsing "msg": invalid syntax which seems inconsistent considering that variables can be used for ordering as suggested by the documentation.

Value variables currently cannot be used as an offset.

What you can do now on from the client libraries is use [GraphQL variables[( to insert client-side variables for the offset value.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.