Restored rudimentary tag filtering.

This commit is contained in:
ThePendulum 2020-01-30 23:41:10 +01:00
parent eb9bc4677e
commit 42f227c39d
5 changed files with 36 additions and 1 deletions

View File

@ -53,6 +53,7 @@ function initActorActions(store, _router) {
$after:Date = "1900-01-01",
$before:Date = "2100-01-01",
$orderBy:[ReleasesActorsOrderBy!]
$exclude: [String!]
) {
actor: actorBySlug(slug: $actorSlug) {
id
@ -119,6 +120,15 @@ function initActorActions(store, _router) {
date: {
lessThan: $before,
greaterThan: $after,
},
releasesTags: {
none: {
tag: {
slug: {
in: $exclude
}
}
}
}
}
},
@ -155,6 +165,7 @@ function initActorActions(store, _router) {
after: store.getters.after,
before: store.getters.before,
orderBy: store.state.ui.range === 'upcoming' ? 'RELEASE_BY_RELEASE_ID__DATE_ASC' : 'RELEASE_BY_RELEASE_ID__DATE_DESC',
exclude: store.state.ui.filter,
});
return curateActor(actor);

View File

@ -121,6 +121,15 @@ const releasesFragment = `
lessThan: $before,
greaterThan: $after,
}
releasesTags: {
none: {
tag: {
slug: {
in: $exclude
}
}
}
}
},
first: $limit,
orderBy: $orderBy,

View File

@ -11,6 +11,7 @@ function initNetworksActions(store, _router) {
$after:Date = "1900-01-01",
$before:Date = "2100-01-01",
$orderBy: [ReleasesOrderBy!]
$exclude: [String!]
) {
network: networkBySlug(slug: $networkSlug) {
id
@ -46,6 +47,15 @@ function initNetworksActions(store, _router) {
lessThan: $before,
greaterThan: $after,
}
releasesTags: {
none: {
tag: {
slug: {
in: $exclude
}
}
}
}
}
) {
${releaseFields}
@ -57,6 +67,7 @@ function initNetworksActions(store, _router) {
after: store.getters.after,
before: store.getters.before,
orderBy: store.state.ui.range === 'upcoming' ? 'DATE_ASC' : 'DATE_DESC',
exclude: store.state.ui.filter,
});
return curateNetwork(network, releases);

View File

@ -11,7 +11,8 @@ function initReleasesActions(store, _router) {
$limit:Int = 1000,
$after:Date = "1900-01-01",
$before:Date = "2100-01-01",
$orderBy:[ReleasesOrderBy!]
$orderBy:[ReleasesOrderBy!],
$exclude: [String!]
) {
${releasesFragment}
}
@ -20,6 +21,7 @@ function initReleasesActions(store, _router) {
after: store.getters.after,
before: store.getters.before,
orderBy: store.state.ui.range === 'upcoming' ? 'DATE_ASC' : 'DATE_DESC',
exclude: store.state.ui.filter,
});
return releases.map(release => curateRelease(release));

View File

@ -11,6 +11,7 @@ function initSitesActions(store, _router) {
$after:Date = "1900-01-01",
$before:Date = "2100-01-01",
$orderBy:[ReleasesOrderBy!]
$exclude: [String!]
) {
site: siteBySlug(slug: $siteSlug) {
name
@ -38,6 +39,7 @@ function initSitesActions(store, _router) {
after: store.getters.after,
before: store.getters.before,
orderBy: store.state.ui.range === 'upcoming' ? 'DATE_ASC' : 'DATE_DESC',
exclude: store.state.ui.filter,
});
return curateSite(site);