mirror of
https://github.com/wassname/talk.git
synced 2026-07-10 09:57:17 +08:00
[next] Implement Comment History Pagination (#2008)
* refactor: profile * feat: add pagination to comment history * feat: add getMeSourceID helper * feat: update profile in CreateCommentMutation * fix: clear query response cache on mutation * test: add integration tests for profile * test: add unit tests
This commit is contained in:
@@ -28,7 +28,10 @@ export function denormalizeComments(commentList: any[]) {
|
||||
export function denormalizeAsset(asset: any) {
|
||||
const commentNodes =
|
||||
(asset.comments &&
|
||||
asset.comments.edges.map((edge: any) => denormalizeComment(edge))) ||
|
||||
asset.comments.edges.map((edge: any) => ({
|
||||
...edge,
|
||||
node: denormalizeComment(edge.node),
|
||||
}))) ||
|
||||
[];
|
||||
const commentsPageInfo = (asset.comments && asset.comments.pageInfo) || {
|
||||
endCursor: null,
|
||||
|
||||
Reference in New Issue
Block a user