Skip to content

Commit

Permalink
fix tracedSVG fields
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Dec 1, 2022
1 parent fe40f48 commit 7d9dded
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/gatsby-source-contentful/src/extend-node-type.js
Expand Up @@ -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 },
Expand Down Expand Up @@ -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) },
Expand Down Expand Up @@ -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 },
Expand Down

0 comments on commit 7d9dded

Please sign in to comment.