mirror of
https://github.com/wassname/talk.git
synced 2026-09-10 12:43:11 +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:
@@ -242,6 +242,20 @@ export const assets = denormalizeAssets([
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
...baseAsset,
|
||||
id: "asset-2",
|
||||
url: "http://localhost/assets/asset-2",
|
||||
comments: {
|
||||
edges: [
|
||||
{ node: comments[2], cursor: comments[2].createdAt },
|
||||
{ node: comments[3], cursor: comments[3].createdAt },
|
||||
],
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
export const assetWithReplies = denormalizeAsset({
|
||||
@@ -293,3 +307,23 @@ export const assetWithDeepestReplies = denormalizeAsset({
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const meWithComments = {
|
||||
id: "me-with-comments",
|
||||
username: "Markus",
|
||||
comments: {
|
||||
edges: [
|
||||
{
|
||||
node: { ...assets[0].comments.edges[0].node, asset: assets[0] },
|
||||
cursor: comments[0].createdAt,
|
||||
},
|
||||
{
|
||||
node: { ...assets[1].comments.edges[0].node, asset: assets[1] },
|
||||
cursor: comments[1].createdAt,
|
||||
},
|
||||
],
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user