Sammy/t 363 comments count at row level depends on total comments number (#192)

* feature: add rightEndContent to editable cell

* refactor: use rightEndContent instead of comments sections

* refactor: move commentCount in a var

* feature: get commentsCount from backend

* refactor: use an index

* feature: use commentCount from backend on people

* refactor: rename commentCount for companies

* refactor: use generated queries, instead of useQuery
This commit is contained in:
Sammy Teillet
2023-06-05 14:41:27 +02:00
committed by GitHub
parent d3684b34c5
commit 6de90024ef
8 changed files with 162 additions and 22 deletions

View File

@ -63,7 +63,7 @@ export class CompanyRelationsResolver {
@TypeGraphQL.ResolveField(() => TypeGraphQL.Int, {
nullable: false,
})
async _commentsCount(@TypeGraphQL.Root() company: Company): Promise<number> {
async _commentCount(@TypeGraphQL.Root() company: Company): Promise<number> {
return this.prismaService.comment.count({
where: {
commentThread: {