[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:
Kiwi
2018-10-19 17:54:40 +00:00
committed by Wyatt Johnson
parent bc4d746291
commit 2e6237b9d9
27 changed files with 1521 additions and 132 deletions
+34
View File
@@ -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,
},
},
};