Open sadeq-qafari opened 5 months ago
no, it is only seen in api or grapqhl, but it needs custom code
// Allow to extend schema comments, for view author full data
extensionService.use(({ nexus }) => ({
types: [
nexus.extendType({
type: "CommentSingle",
definition(t) {
t.string("authorFull", {
type: "UsersPermissionsUserEntityResponse",
description: "Author full data",
resolve: async (parent, root, args) => {
const { toEntityResponse } = strapi.service(
"plugin::graphql.format"
).returnTypes;
console.log("parent", parent.author.id);
const user = await strapi.db
.query("plugin::users-permissions.user")
.findOne({
where: { id: parent.author.id },
populate: { profile_image: true },
});
console.log("user", user);
return toEntityResponse(user);
},
});
},
}),
],
}));
Hi, is there any way to show author's email in comments section in admin panel?