From 9e61200a48e84c8334151a6dfa62d77d430cd9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frivalszky-Mayer=20P=C3=A9ter?= Date: Wed, 6 Dec 2023 10:35:12 +0100 Subject: [PATCH] fix(contentful): rich text linked asset filter (#38716) --- .../src/create-schema-customization.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/gatsby-source-contentful/src/create-schema-customization.ts b/packages/gatsby-source-contentful/src/create-schema-customization.ts index e0f9602136fd9..0ace98a95372d 100644 --- a/packages/gatsby-source-contentful/src/create-schema-customization.ts +++ b/packages/gatsby-source-contentful/src/create-schema-customization.ts @@ -579,11 +579,13 @@ export const createSchemaCustomization: GatsbyNode["createSchemaCustomization"] const res = await context.nodeModel.findAll({ query: { - sys: { - id: { - in: links, + filter: { + sys: { + id: { + in: links, + }, + spaceId: { eq: node.sys.spaceId }, }, - spaceId: { eq: node.sys.spaceId }, }, }, type: `Contentful${entityType}`,