From 0ef4f77954ba54b52b96c70a8bffe96804bd222d Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 16 Dec 2021 18:22:08 +0100 Subject: chore: display featuredImage and meta on posts list --- src/services/graphql/blog.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/services/graphql/blog.ts') diff --git a/src/services/graphql/blog.ts b/src/services/graphql/blog.ts index 6b92b5a..27b972b 100644 --- a/src/services/graphql/blog.ts +++ b/src/services/graphql/blog.ts @@ -99,12 +99,14 @@ export const getPublishedPosts: GetPostsListReturn = async ({ contentParts, databaseId, date, + featuredImage, id, modified, slug, title, } = post.node; const content = contentParts.beforeMore; + const cover = featuredImage ? featuredImage.node : null; const dates = { publication: date, update: modified }; const subjects = acfPosts.postsInSubject && acfPosts.postsInSubject?.length > 0 @@ -120,6 +122,7 @@ export const getPublishedPosts: GetPostsListReturn = async ({ content, databaseId, date: dates, + featuredImage: cover, id, slug, subjects, -- cgit v1.2.3