From 7d9dded3fe3ac1284478c0783a198e976db46ee3 Mon Sep 17 00:00:00 2001 From: pieh Date: Thu, 1 Dec 2022 17:13:23 +0100 Subject: [PATCH] fix tracedSVG fields --- .../gatsby-source-contentful/src/extend-node-type.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/gatsby-source-contentful/src/extend-node-type.js b/packages/gatsby-source-contentful/src/extend-node-type.js index 87b76fd188d7c..63ddf9980902f 100644 --- a/packages/gatsby-source-contentful/src/extend-node-type.js +++ b/packages/gatsby-source-contentful/src/extend-node-type.js @@ -509,14 +509,14 @@ const fixedNodeType = ({ name, reporter }) => { }, tracedSVG: { type: GraphQLString, - resolve: parent => { + resolve: imageProps => { if (!didShowTraceSVGRemovalWarningFixed) { console.warn( `"tracedSVG" placeholder field is no longer supported (used in ContentfulAsset.fixed processing), falling back to "base64". See https://gatsby.dev/tracesvg-removal/` ) didShowTraceSVGRemovalWarningFixed = true } - return parent.base64 + return getBase64Image(imageProps, reporter) }, }, aspectRatio: { type: GraphQLFloat }, @@ -619,14 +619,14 @@ const fluidNodeType = ({ name, reporter }) => { }, tracedSVG: { type: GraphQLString, - resolve: parent => { + resolve: imageProps => { if (!didShowTraceSVGRemovalWarningFluid) { console.warn( `"tracedSVG" placeholder field is no longer supported (used in ContentfulAsset.fluid processing), falling back to "base64". See https://gatsby.dev/tracesvg-removal/` ) didShowTraceSVGRemovalWarningFluid = true } - return parent.base64 + return getBase64Image(imageProps, reporter) }, }, aspectRatio: { type: new GraphQLNonNull(GraphQLFloat) }, @@ -915,14 +915,14 @@ exports.extendNodeType = ({ type, store, reporter }) => { }, tracedSVG: { type: GraphQLString, - resolve: parent => { + resolve: imageProps => { if (!didShowTraceSVGRemovalWarningResize) { console.warn( `"tracedSVG" placeholder field is no longer supported (used in ContentfulAsset.resize processing), falling back to "base64". See https://gatsby.dev/tracesvg-removal/` ) didShowTraceSVGRemovalWarningResize = true } - return parent.base64 + return getBase64Image(imageProps, reporter) }, }, src: { type: GraphQLString },