Prismic documentation, albeit quite hidden, says the following (Source):
The Prismic GraphQL API returns a maximum of 20 documents per request. There is no way to increase this number, so this page explains how you can retrieve more than this initial 20 documents.
I truly understand this limitation, but it makes it very cumber-stone for Next.js and its getStaticPaths
where one normally only needs to query the UID
for each document. In this use-case the Prismic GraphQL API should not be under a heavy load at all even when returning hundreds of documents.
Are there any chances for Prismic GraphQL API to enable something in terms of queryAllUIDs
to greatly simplify this scenario?
Alternatively, would anyone have a reusable solution for the said problem? Creating a function to bypass this limitation seems to require tons of unique extra props for each custom type compared to simply fetching all the data up to the limit of 20, and typically this behaviour is required on every route of every website.