Merge pull request #11670 from strapi/v4/graphql-fix-media-relations-querying

[V4] GraphQL fix media attributes queries
This commit is contained in:
Alexandre BODIN 2021-11-24 17:47:56 +01:00 committed by GitHub
commit 9b07a911f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,12 +150,6 @@ module.exports = context => {
const type = attribute.multiple
? naming.getRelationResponseCollectionName(fileContentType)
: naming.getEntityResponseName(fileContentType);
const resolverPath = `${naming.getTypeName(contentType)}.${attributeName}`;
const resolverAuthScope = `${fileUID}.find`;
extension.use({
resolversConfig: { [resolverPath]: { auth: { scope: [resolverAuthScope] } } },
});
builder.field(attributeName, { type, resolve, args });
};