Modified network releases query to accomodate date sorting. Showing upcoming releases first to last.

This commit is contained in:
2020-01-09 00:23:37 +01:00
parent 58f01a2f75
commit 9da63baf65
8 changed files with 102 additions and 67 deletions

View File

@@ -52,6 +52,7 @@ function initActorActions(store, _router) {
$limit:Int = 1000,
$after:Date = "1900-01-01",
$before:Date = "2100-01-01",
$orderBy:[ReleasesActorsOrderBy!]
) {
actor: actorBySlug(slug: $actorSlug) {
id
@@ -120,7 +121,7 @@ function initActorActions(store, _router) {
}
},
first: $limit,
orderBy: RELEASE_BY_RELEASE_ID__DATE_DESC,
orderBy: $orderBy
) {
release {
id
@@ -151,6 +152,7 @@ function initActorActions(store, _router) {
limit,
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',
});
return curateActor(actor);