contentful-metalsmith icon indicating copy to clipboard operation
contentful-metalsmith copied to clipboard

allow limits > 1000 in a query

Open bnchdrff opened this issue 9 years ago • 4 comments
trafficstars

the contentful api only allows up to 1000 items returned in a given query. it'd be nice to provide a query batcher that lets you build a site with more than 1000 entries.

bnchdrff avatar Nov 10 '16 20:11 bnchdrff

Hi @bnchdrff ,

Actually that make sense, and I guess we need to change this logic here if I am not mistaken, and to handle pagination using the query params, skip and limit, actually we have this logic already implemented in contentful-export and contentful-space sync. Here is the snippet of code.

Khaledgarbaya avatar Nov 10 '16 21:11 Khaledgarbaya

One more thing to be careful of that sometimes entries with a lot of text in one page could exceed the maximum response size which is 8MB so I guess the setting the limit should be up to the user based on his content, so he can lower the limit value to have responses < 8MB

Khaledgarbaya avatar Nov 10 '16 21:11 Khaledgarbaya

what if this feature was added into the js api client itself?

bnchdrff avatar Nov 10 '16 21:11 bnchdrff

We can't do that since that will be hiding the actual api functionality also to give users control over their rate limit.

Khaledgarbaya avatar Nov 11 '16 09:11 Khaledgarbaya