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:
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user