From bf0610b27222b1c9efb2e413426147b11ec11ab2 Mon Sep 17 00:00:00 2001 From: Graeme Fulton Date: Sat, 29 Jun 2024 22:49:30 -0400 Subject: [PATCH] make like count work for news #55 --- lib/queries/singleNewsQuery.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/queries/singleNewsQuery.js b/lib/queries/singleNewsQuery.js index 124787c8..4a9434b2 100644 --- a/lib/queries/singleNewsQuery.js +++ b/lib/queries/singleNewsQuery.js @@ -2,11 +2,35 @@ export default ` query PostBySlug($status: String, $slug: String, $type: String) { posts(filters: {status:{eq:$status}, slug:{eq:$slug}, type:{eq:$type}}) { data { + id attributes { title slug content excerpt + likeCount{ + total + like + fire + unicorn + } + likes{ + data{ + id + attributes{ + like + love + fire + unicorn + total + user{ + data{ + id + } + } + } + } + } seo{ metaDesc canonical