From 83c2185187a3489c363604fc96196d9254a0ae99 Mon Sep 17 00:00:00 2001 From: Alex Hramovich Date: Thu, 12 Nov 2020 11:36:06 +0300 Subject: [PATCH] update diversity query --- package.json | 2 +- src/fetch-diversity.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 932d8ce..4cbdd4f 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@focus-reactive/graphql-content-layer", - "version": "2.3.6", + "version": "2.3.7", "private": false, "main": "dist/index.js", "scripts": { diff --git a/src/fetch-diversity.js b/src/fetch-diversity.js index ce9e9e0..af1b2a6 100644 --- a/src/fetch-diversity.js +++ b/src/fetch-diversity.js @@ -25,6 +25,7 @@ const queryPages = /* GraphQL */ ` sponsors { id title + site avatar { url } @@ -58,9 +59,10 @@ const fetchData = async (client, { tagColors, ...vars }) => { const diversity = { ...data, description: await markdownToHtml(data.description), - sponsors: data.sponsors.map(({ title, avatar: { url }, id }) => ({ + sponsors: data.sponsors.map(({ title, avatar: { url }, id, site }) => ({ id, title, + site, avatar: url, contentType: contentTypeMap.Sponsor, })),