Lucas/t 364 on comment drawer i can fetch all comment threads with (#193)

* Added prisma to suggested extension in container

* Added comments and authors on drawer with proper resolving

* Fix lint

* Fix console log

* Fixed generated front graphql from rebase
This commit is contained in:
Lucas Bordeau
2023-06-05 15:23:29 +02:00
committed by GitHub
parent 6de90024ef
commit fe70f30a29
9 changed files with 208 additions and 12 deletions

View File

@ -34,3 +34,28 @@ export const usePeopleCommentsCountQuery = (personId: string) => {
});
return { ...rest, data: data?.people[0].commentsCount };
};
export const GET_COMMENT_THREADS_BY_TARGETS = gql`
query GetCommentThreadsByTargets($commentThreadTargetIds: [String!]!) {
findManyCommentThreads(
where: {
commentThreadTargets: {
some: { commentableId: { in: $commentThreadTargetIds } }
}
}
) {
id
comments {
id
body
createdAt
updatedAt
author {
id
displayName
avatarUrl
}
}
}
}
`;