From 04cd7312a62c27cbfa5484551a57a5796dace45d Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Fri, 27 Jan 2017 15:52:05 -0700 Subject: [PATCH] Added support for new commentCount --- client/coral-embed-stream/src/Embed.js | 2 +- client/coral-framework/graphql/queries/streamQuery.graphql | 1 + client/coral-plugin-stream/Stream.js | 1 + graph/loaders/util.js | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js index fd505e299..2a7057cca 100644 --- a/client/coral-embed-stream/src/Embed.js +++ b/client/coral-embed-stream/src/Embed.js @@ -105,7 +105,7 @@ class Embed extends Component { loading ? :
- + Settings Configure Stream diff --git a/client/coral-framework/graphql/queries/streamQuery.graphql b/client/coral-framework/graphql/queries/streamQuery.graphql index 77f8ed356..583a2db13 100644 --- a/client/coral-framework/graphql/queries/streamQuery.graphql +++ b/client/coral-framework/graphql/queries/streamQuery.graphql @@ -17,6 +17,7 @@ query AssetQuery($asset_url: String!) { charCount requireEmailConfirmation } + commentCount comments { ...commentView replies { diff --git a/client/coral-plugin-stream/Stream.js b/client/coral-plugin-stream/Stream.js index 2ec84af24..633a98502 100644 --- a/client/coral-plugin-stream/Stream.js +++ b/client/coral-plugin-stream/Stream.js @@ -73,6 +73,7 @@ query AssetQuery($asset_id: ID!) { id title url + commentCount comments { ...commentView replies { diff --git a/graph/loaders/util.js b/graph/loaders/util.js index dbfcdedfd..4640d8245 100644 --- a/graph/loaders/util.js +++ b/graph/loaders/util.js @@ -72,9 +72,9 @@ class SharedCacheDataLoader extends DataLoader { constructor(prefix, expiry, batchLoadFn, options) { super(SharedCacheDataLoader.batchLoadFn(prefix, expiry, batchLoadFn), options); - this._keyFunc = SharedCacheDataLoader.keyFunc(this._prefix); this._prefix = prefix; this._expiry = expiry; + this._keyFunc = SharedCacheDataLoader.keyFunc(this._prefix); } /**