diff --git a/packages/gatsby-source-contentful/src/fetch.js b/packages/gatsby-source-contentful/src/fetch.js index 9668b218b2aa2..7bfa57f54a773 100644 --- a/packages/gatsby-source-contentful/src/fetch.js +++ b/packages/gatsby-source-contentful/src/fetch.js @@ -79,6 +79,7 @@ module.exports = async function contentfulFetch({ }) { // Fetch articles. let syncProgress + let syncItemCount = 0 const pageLimit = pluginConfig.get(`pageLimit`) const contentfulClientOptions = { space: pluginConfig.get(`spaceId`), @@ -110,6 +111,8 @@ module.exports = async function contentfulFetch({ !response.isAxiosError && response?.data.items ) { + syncItemCount += response.data.items.length + syncProgress.total = syncItemCount syncProgress.tick(response.data.items.length) }