diff --git a/client/coral-embed-stream/src/Stream.js b/client/coral-embed-stream/src/Stream.js
index 65743e6c7..1b586706f 100644
--- a/client/coral-embed-stream/src/Stream.js
+++ b/client/coral-embed-stream/src/Stream.js
@@ -46,8 +46,8 @@ class Stream extends React.Component {
return (
{
- comments.map(comment => {
- return
+ ;
- })
+ comment={comment} />
+ )
}
);
diff --git a/client/coral-framework/graphql/queries/index.js b/client/coral-framework/graphql/queries/index.js
index 831d3512c..aa22feae5 100644
--- a/client/coral-framework/graphql/queries/index.js
+++ b/client/coral-framework/graphql/queries/index.js
@@ -35,16 +35,13 @@ export const queryStream = graphql(STREAM_QUERY, {
asset_id,
sort
},
- updateQuery: (oldData, {fetchMoreResult:{data:{new_top_level_comments}}}) => {
- const asset = {
+ updateQuery: (oldData, {fetchMoreResult:{data:{new_top_level_comments}}}) => ({
+ ...oldData,
+ asset: {
...oldData.asset,
comments: [...oldData.asset.comments, ...new_top_level_comments]
- };
- return {
- ...oldData,
- asset
- };
- }
+ }
+ })
});
}
})
diff --git a/client/coral-framework/graphql/queries/loadMore.graphql b/client/coral-framework/graphql/queries/loadMore.graphql
index a85eaecca..c7dca9bf3 100644
--- a/client/coral-framework/graphql/queries/loadMore.graphql
+++ b/client/coral-framework/graphql/queries/loadMore.graphql
@@ -3,5 +3,8 @@
query LoadMoreComments($limit: Int = 5, $cursor: Date, $parent_id: ID, $asset_id: ID, $sort: SORT_ORDER) {
new_top_level_comments: comments(query: {limit: $limit, cursor: $cursor, parent_id: $parent_id, asset_id: $asset_id, sort: $sort}) {
...commentView
+ replies(limit: 3) {
+ ...commentView
+ }
}
}
diff --git a/client/coral-framework/graphql/queries/streamQuery.graphql b/client/coral-framework/graphql/queries/streamQuery.graphql
index bfd7cee33..bab18490d 100644
--- a/client/coral-framework/graphql/queries/streamQuery.graphql
+++ b/client/coral-framework/graphql/queries/streamQuery.graphql
@@ -18,9 +18,9 @@ query AssetQuery($asset_url: String!) {
requireEmailConfirmation
}
commentCount
- comments(limit: 2) {
+ comments(limit: 10) {
...commentView
- replies(limit: 2) {
+ replies(limit: 3) {
...commentView
}
}
diff --git a/client/coral-plugin-stream/Stream.js b/client/coral-plugin-stream/Stream.js
index 633a98502..5add6b753 100644
--- a/client/coral-plugin-stream/Stream.js
+++ b/client/coral-plugin-stream/Stream.js
@@ -19,7 +19,6 @@ class Stream extends Component {
}
render() {
- console.log(this.props);
const {data} = this.props;
return