https://prefect.io logo
Title
l

Lawrence Finn

09/10/2021, 2:29 PM
I saw some notes about the interactive ui enforcing pagination on graphql requests. Is pagination forced on all graphql requests?
k

Kevin Kho

09/10/2021, 2:38 PM
Hey @Lawrence Finn , I need to ask the team about this
l

Lawrence Finn

09/10/2021, 2:39 PM
Similarly, is there a request timeout built in? I think I got back an error once saying the request took too long or something
n

nicholas

09/10/2021, 3:08 PM
Hi @Lawrence Finn - the limits/pagination are enforced in the interactive API for all queries that take the limit and offset terms. The request timeout is on the API side and is most often triggered by deeply nested queries, since those touch a lot of different data
l

Lawrence Finn

09/10/2021, 3:28 PM
ah, so if im making graphql calls from my own graphql client i dont need to use pagination? what’s the request timeout value?
n

nicholas

09/10/2021, 3:36 PM
That’s correct - the timeout is 3 seconds
c

Casey Green

09/10/2021, 4:02 PM
is it possible to adjust the timeout on the client side?
sorry missed this part
The request timeout is on the API side
Is there is a point at which you should use pagination to avoid that timeout? like paginate 100 rows at a time? 1000 rows?
k

Kevin Kho

09/10/2021, 5:38 PM
I think you need to use
limit
and
offset
if your queries are timing out yep.
n

nicholas

09/10/2021, 5:39 PM
Like I mentioned above though, the best way to avoid timeouts is to use simpler queries - the more nested something is, the longer it’ll take and the more likely it’ll time out. If you need to fetch data that you would otherwise join, you can always split it into multiple single-table queries
l

Lawrence Finn

09/10/2021, 5:42 PM
I think most of our queries are pretty simple, maybe the most complex is find flows with names like “xxxx%“. If we are paginating, should we set an order by to ensure ordering is consistent?
n

nicholas

09/10/2021, 5:46 PM
You shouldn’t need to @Lawrence Finn but you can!