From 336c80aa56aceee0a92740277a11ff5b27945946 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 5 Nov 2019 19:03:24 -0700 Subject: [PATCH 1/2] await transformer --- gatsby-node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gatsby-node.js b/gatsby-node.js index 1941cc2..9b29589 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -43,7 +43,7 @@ exports.onPostBuild = async function( if (result.errors) { report.panic(`failed to index to Algolia`, result.errors); } - const objects = transformer(result); + const objects = await transformer(result); const chunks = chunk(objects, chunkSize); setStatus(activity, `query ${i}: splitting in ${chunks.length} jobs`); From 10a44941d944467264eb6039c4764edbd41f9a5a Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 6 Nov 2019 08:02:28 -0700 Subject: [PATCH 2/2] add note about transformer field accepting optional async function --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6da2a41..e1661f5 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,8 @@ module.exports = { }; ``` +The `transformer` field accepts a function and optionally you may provide an `async` function. + # Feedback This is the very first version of our plugin and isn't yet officially supported. Please leave all your feedback in GitHub issues 😊