Skip to content

Commit

Permalink
fix(gatsby-source-contentful): add query to the subsequent api call (g…
Browse files Browse the repository at this point in the history
…atsbyjs#14449)

* fix(gatsby-source-contentful): propagate query to the subsequent api call

* fix(gatsby-source-contentful) add missing pageLimit
  • Loading branch information
sbezludny authored and pieh committed May 31, 2019
1 parent 808a463 commit 45fcefb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/gatsby-source-contentful/src/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,14 @@ function pagedGet(
aggregatedResponse.items = aggregatedResponse.items.concat(response.items)
}
if (skip + pageLimit <= response.total) {
return pagedGet(client, method, skip + pageLimit, aggregatedResponse)
return pagedGet(
client,
method,
query,
skip + pageLimit,
pageLimit,
aggregatedResponse
)
}
return aggregatedResponse
})
Expand Down

0 comments on commit 45fcefb

Please sign in to comment.