From 4620c330b8261d1266d4ce66ae9de9abce535f9c Mon Sep 17 00:00:00 2001 From: Convly Date: Mon, 23 Aug 2021 20:06:34 +0200 Subject: [PATCH] Use strapi.contentTypes[uid] instead of strapi.plugin().contentType() to keep the same data structure --- .../plugins/graphql/server/services/schema/builders/type.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/plugins/graphql/server/services/schema/builders/type.js b/packages/plugins/graphql/server/services/schema/builders/type.js index db3fcb14ad..d6852bbe81 100644 --- a/packages/plugins/graphql/server/services/schema/builders/type.js +++ b/packages/plugins/graphql/server/services/schema/builders/type.js @@ -211,9 +211,7 @@ const addMediaAttribute = options => { context: { strapi }, } = options; - // todo[v4]: we shouldn't have to handle differently cts fetched - // with the .contentType() & those fetched using .contentTypes - const fileContentType = strapi.plugin('upload').contentType('file').schema; + const fileContentType = strapi.contentTypes['plugin::upload.file']; const resolve = buildAssociationResolver({ contentTypeUID: contentType.uid,