We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9921390 commit a3357dcCopy full SHA for a3357dc
src/gatsby-node.ts
@@ -201,8 +201,8 @@ const getDocumentIds = async (client: SanityClient): Promise<string[]> => {
201
while (true) {
202
const batch = await client.fetch<string[]>(
203
prevId !== undefined
204
- ? `*[!(_type match "system.**") && _id > $prevId][0...$batchSize]._id`
205
- : `*[!(_type match "system.**")][0...$batchSize]._id`,
+ ? `*[!(_type match "system.**") && _id > $prevId]|order(_id asc)[0...$batchSize]._id`
+ : `*[!(_type match "system.**")]|order(_id asc)[0...$batchSize]._id`,
206
{
207
prevId: prevId || null,
208
batchSize,
0 commit comments