Querying for >100 records for redirects?

I’d like to maintain a redirects list using DatoCMS but have hit on a roadblock, I’m using Next on Vercel but equally could be Nuxt on Netlify, there is a redirects file in the root of a Vercel/Netlify project that does this, but it’s equally possible to query a redirects model from the nuxt/next.config which will build out the redirects during the publish.

The issue is that I can’t retrieve more than 100 redirects from the graphQl API this way. I have approx 500 redirects at the moment so I can’t think of a way to do this other than get the index first then make multiple calls. Is there a better approach for this that anyone has come across?

Hello @jack1

It seems like you are running into a pagination issue, would you be able to paginate the GraphQL requests in your use case? You can fetch the number of records using the meta as specified bellow, and the loop through them by fetching 100 records per request (so for 1000 records, 10 requests, for 2000, 20 requests, and so on)

Ok thanks will try it that way)