From 45fcefb8d5f1afacfd6a3913240295fbc42d22d8 Mon Sep 17 00:00:00 2001 From: Sergii Bezliudnyi Date: Fri, 31 May 2019 18:29:40 +0200 Subject: [PATCH] fix(gatsby-source-contentful): add query to the subsequent api call (#14449) * fix(gatsby-source-contentful): propagate query to the subsequent api call * fix(gatsby-source-contentful) add missing pageLimit --- packages/gatsby-source-contentful/src/fetch.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-source-contentful/src/fetch.js b/packages/gatsby-source-contentful/src/fetch.js index 0c4e09f224189..44c70ccd2b2b6 100644 --- a/packages/gatsby-source-contentful/src/fetch.js +++ b/packages/gatsby-source-contentful/src/fetch.js @@ -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 })