diff --git a/.changeset/few-points-do.md b/.changeset/few-points-do.md new file mode 100644 index 000000000..1c3f1c1fc --- /dev/null +++ b/.changeset/few-points-do.md @@ -0,0 +1,5 @@ +--- +"gatsby-source-strapi": patch +--- + +No need for JSON.stringify when results are already String diff --git a/packages/gatsby-source-strapi/src/fetch.js b/packages/gatsby-source-strapi/src/fetch.js index 5dc82e525..84b477a3a 100644 --- a/packages/gatsby-source-strapi/src/fetch.js +++ b/packages/gatsby-source-strapi/src/fetch.js @@ -37,8 +37,8 @@ export const fetchEntity = async ({ endpoint, queryParams, uid, pluginOptions }, try { reporter.info( - `Starting to fetch data from Strapi - ${options.url} with ${JSON.stringify( - options.paramsSerializer(options.params) + `Starting to fetch data from Strapi - ${options.url} with ${options.paramsSerializer( + options.params )}` ); @@ -120,8 +120,8 @@ export const fetchEntities = async ({ endpoint, queryParams, uid, pluginOptions try { reporter.info( - `Starting to fetch data from Strapi - ${options.url} with ${JSON.stringify( - options.paramsSerializer(options.params) + `Starting to fetch data from Strapi - ${options.url} with ${options.paramsSerializer( + options.params )}` ); @@ -151,9 +151,9 @@ export const fetchEntities = async ({ endpoint, queryParams, uid, pluginOptions }; reporter.info( - `Starting to fetch page ${page} from Strapi - ${fetchOptions.url} with ${JSON.stringify( - options.paramsSerializer(fetchOptions.params) - )}` + `Starting to fetch page ${page} from Strapi - ${ + fetchOptions.url + } with ${options.paramsSerializer(fetchOptions.params)}` ); try {