diff --git a/src/releases.js b/src/releases.js index e9c86310..0e4ef236 100644 --- a/src/releases.js +++ b/src/releases.js @@ -52,6 +52,28 @@ const releaseFields = ` duration title description + poster: chaptersPosterByChapterId { + media { + id + path + thumbnail + s3: isS3 + width + height + size + } + } + photos: chaptersPhotos { + media { + id + path + thumbnail + s3: isS3 + width + height + size + } + } } poster: releasesPosterByReleaseId { media { @@ -170,7 +192,11 @@ function curateGraphqlRelease(release) { entity: release.entity, actors: release.actors.map(actor => actor.actor), tags: release.tags.map(tag => tag.tag), - ...(release.chapters && { chapters: release.chapters }), + ...(release.chapters && { chapters: release.chapters.map(chapter => ({ + ...chapter, + poster: chapter.poster?.media || null, + photos: chapter.photos.map(photo => photo.media), + })) }), poster: release.poster?.media || null, ...(release.photos && { photos: release.photos.map(photo => photo.media) }), trailer: release.trailer?.media || null,