aboutsummaryrefslogtreecommitdiffstats
path: root/src/services/graphql/blog.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/graphql/blog.ts')
-rw-r--r--src/services/graphql/blog.ts3
1 files changed, 3 insertions, 0 deletions
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,