Skip to content

Commit 2ba1c25

Browse files
committed
chore: simplify playlist query
1 parent 816692d commit 2ba1c25

2 files changed

Lines changed: 1301 additions & 1768 deletions

File tree

bccm_core/lib/src/features/graphql/queries/playlists.graphql

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
fragment PlaylistDetails on Playlist {
2-
id
3-
title
4-
description
5-
image
6-
}
7-
8-
fragment PlaylistContributor on Contributor {
9-
contributionTypes
10-
person {
11-
id
12-
name
13-
}
14-
}
15-
161
fragment PlaylistSong on Song {
172
id
183
key
@@ -23,13 +8,20 @@ fragment PlaylistSong on Song {
238
code
249
}
2510
contributors {
26-
...PlaylistContributor
11+
contributionTypes
12+
person {
13+
id
14+
name
15+
}
2716
}
2817
}
2918

3019
query GetPlaylist($id: ID!, $first: Int, $cursor: Cursor) {
3120
playlist(id: $id) {
32-
...PlaylistDetails
21+
id
22+
title
23+
description
24+
image
3325
items(first: $first, cursor: $cursor) {
3426
total
3527
first
@@ -38,22 +30,13 @@ query GetPlaylist($id: ID!, $first: Int, $cursor: Cursor) {
3830
items {
3931
__typename
4032
... on Episode {
41-
id
42-
title
43-
description
44-
duration
33+
...PlayableMediaItem
4534
copyrightHolder {
46-
id
4735
name
48-
type
4936
}
5037
songs {
5138
...PlaylistSong
5239
}
53-
contributors {
54-
...PlaylistContributor
55-
}
56-
...PlayableMediaItem
5740
}
5841
... on Short {
5942
id

0 commit comments

Comments
 (0)