[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 19:54:40 +02:00
committed by Wyatt Johnson
parent bc4d746291
commit 2e6237b9d9
27 changed files with 1521 additions and 132 deletions
@@ -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,