https://prefect.io logo
k

Kostiantyn Liepieshov

10/15/2022, 10:34 AM
Hey everybody, I have just started with prefect graphql interface, but I cannot find how I should correctly do the pagination with it? Does anybody knows how to paginate response in prefect graphql?
r

Rob Freedy

10/17/2022, 1:52 PM
I am not sure if there is a better way to do this, but you could use the
limit
and
offset
values to help paginate results. Something like the example below:
Copy code
query {
  flow_run (limit:4, offset:2) {
   	id
  }
}
k

Kostiantyn Liepieshov

10/17/2022, 2:18 PM
I thought about this as well, but then how to get the count ( I though about iterating while the output is not empty). But more importantly: how to preserve the order consistency?