aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/Bug.js
diff options
context:
space:
mode:
authorQuentin Gliech <quentingliech@gmail.com>2018-07-31 00:18:55 +0200
committerQuentin Gliech <quentingliech@gmail.com>2018-07-31 00:18:55 +0200
commit8a4e373e7b1c093abeb967d9a6a43c5ed533edb8 (patch)
tree48d61c44e59a690d73e55b5fca288ef94b1d3569 /webui/src/Bug.js
parent091ac03f1f758bd681c5f522b88c04ea04d81359 (diff)
downloadgit-bug-8a4e373e7b1c093abeb967d9a6a43c5ed533edb8.tar.gz
webui: Use the new schema
Diffstat (limited to 'webui/src/Bug.js')
-rw-r--r--webui/src/Bug.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/webui/src/Bug.js b/webui/src/Bug.js
index 28558a13..f8699fc4 100644
--- a/webui/src/Bug.js
+++ b/webui/src/Bug.js
@@ -17,8 +17,8 @@ const Bug = ({ bug, classes }) => (
<main className={classes.main}>
<BugSummary bug={bug} />
- {bug.comments.map((comment, index) => (
- <Comment key={index} comment={comment} />
+ {bug.comments.edges.map(({ cursor, node }) => (
+ <Comment key={cursor} comment={node} />
))}
</main>
);
@@ -26,8 +26,13 @@ const Bug = ({ bug, classes }) => (
Bug.fragment = gql`
fragment Bug on Bug {
...BugSummary
- comments {
- ...Comment
+ comments(input: { first: 10 }) {
+ edges {
+ cursor
+ node {
+ ...Comment
+ }
+ }
}
}