Skip to content

Commit e938044

Browse files
feat: adding support for channel images
1 parent a67d48e commit e938044

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

src/scenarios/catalog-consumption/GetSingleItem/graphql-documents.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ export const getAllItemsQuery = gql`
141141
hlsStreamUrl
142142
description
143143
dashStreamUrl
144+
images {
145+
nodes {
146+
id
147+
path
148+
type
149+
}
150+
}
144151
}
145152
}
146153
`;

src/scenarios/image/ImagePreview/ImagePreview.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
} from 'semantic-ui-react';
1717
import { getApolloClient } from '../../../apollo-client';
1818
import {
19+
getChannelImagesQuery,
1920
getEpisodeImagesQuery,
2021
getMovieImagesQuery,
2122
getSeasonImagesQuery,
@@ -56,6 +57,8 @@ export const ImagePreview: React.FC = () => {
5657
query = getSeasonImagesQuery;
5758
} else if (entityId.startsWith('episode-')) {
5859
query = getEpisodeImagesQuery;
60+
} else if (entityId.startsWith('channel-')) {
61+
query = getChannelImagesQuery;
5962
}
6063

6164
if (query !== undefined) {

src/scenarios/image/ImagePreview/graphql-documents.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,20 @@ export const getEpisodeImagesQuery = gql`
6767
}
6868
}
6969
`;
70+
71+
export const getChannelImagesQuery = gql`
72+
query GetChannelImages($id: String!) {
73+
channel(id: $id) {
74+
title
75+
images {
76+
nodes {
77+
id
78+
width
79+
height
80+
path
81+
type
82+
}
83+
}
84+
}
85+
}
86+
`;

0 commit comments

Comments
 (0)