Added basic co-star actor filter to actor page.

This commit is contained in:
DebaucheryLibrarian
2020-09-12 03:09:05 +02:00
parent 24fb267b40
commit 62f5d5111a
7 changed files with 155 additions and 6 deletions

View File

@@ -360,6 +360,27 @@ function getIncludedEntities(router) {
];
}
function getIncludedActors(router) {
const includedActors = router.currentRoute.query.actors ? router.currentRoute.query.actors.split(',') : [];
if (includedActors.length === 0) {
return [];
}
return [
{
releasesActorsConnection: {
some: {
actor: {
slug: {
in: includedActors,
},
},
},
},
},
];
}
export {
releaseActorsFragment,
@@ -373,4 +394,5 @@ export {
siteFragment,
sitesFragment,
getIncludedEntities,
getIncludedActors,
};