From e7a3e6ebca645bd15f668aa3c2e763d93d648ea0 Mon Sep 17 00:00:00 2001 From: GatsbyJS Bot Date: Tue, 31 May 2022 04:25:31 -0600 Subject: [PATCH] fix(gatsby-plugin-utils): Make `GatsbyImageData` nullable (#35777) (#35785) Co-authored-by: Lennart --- .../polyfill-remote-file/graphql/gatsby-image-resolver.ts | 2 +- .../gatsby/src/schema/__tests__/__snapshots__/print.js.snap | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/gatsby-plugin-utils/src/polyfill-remote-file/graphql/gatsby-image-resolver.ts b/packages/gatsby-plugin-utils/src/polyfill-remote-file/graphql/gatsby-image-resolver.ts index ca2b18d3038f0..ef0fddd29fa85 100644 --- a/packages/gatsby-plugin-utils/src/polyfill-remote-file/graphql/gatsby-image-resolver.ts +++ b/packages/gatsby-plugin-utils/src/polyfill-remote-file/graphql/gatsby-image-resolver.ts @@ -261,7 +261,7 @@ export function generateGatsbyImageFieldConfig( IGatsbyImageDataArgs > { return { - type: hasFeature(`graphql-typegen`) ? `GatsbyImageData!` : `JSON`, + type: hasFeature(`graphql-typegen`) ? `GatsbyImageData` : `JSON`, description: `Data used in the component. See https://gatsby.dev/img for more info.`, args: { layout: { diff --git a/packages/gatsby/src/schema/__tests__/__snapshots__/print.js.snap b/packages/gatsby/src/schema/__tests__/__snapshots__/print.js.snap index 0d7036a724498..6e7c067c27b9d 100644 --- a/packages/gatsby/src/schema/__tests__/__snapshots__/print.js.snap +++ b/packages/gatsby/src/schema/__tests__/__snapshots__/print.js.snap @@ -193,7 +193,7 @@ interface RemoteFile { fit: RemoteFileFit = COVER cropFocus: [RemoteFileCropFocus] quality: Int = 75 - ): GatsbyImageData! + ): GatsbyImageData } type File implements Node @dontInfer { @@ -582,7 +582,7 @@ interface RemoteFile { fit: RemoteFileFit = COVER cropFocus: [RemoteFileCropFocus] quality: Int = 75 - ): GatsbyImageData! + ): GatsbyImageData } type File implements Node @dontInfer { @@ -981,7 +981,7 @@ interface RemoteFile { fit: RemoteFileFit = COVER cropFocus: [RemoteFileCropFocus] quality: Int = 75 - ): GatsbyImageData! + ): GatsbyImageData } type File implements Node @dontInfer {