Added new tag filter stub.

This commit is contained in:
2020-05-25 04:39:58 +02:00
parent b180572d5f
commit fe69ec4175
10 changed files with 90 additions and 126 deletions

View File

@@ -8,26 +8,19 @@ import { curateActor, curateRelease } from '../curate';
import getDateRange from '../get-date-range';
function initActorActions(store, _router) {
async function fetchActorBySlug({ _commit }, { actorSlug, limit = 100, range = 'latest' }) {
async function fetchActorById({ _commit }, { actorId, limit = 100, range = 'latest' }) {
const { before, after, orderBy } = getDateRange(range);
const { actors: [actor] } = await graphql(`
const { actor } = await graphql(`
query Actor(
$actorSlug: String!
$actorId: Int!
$limit:Int = 1000,
$after:Date = "1900-01-01",
$before:Date = "2100-01-01",
$orderBy:[ReleasesActorsOrderBy!]
$exclude: [String!]
) {
actors(filter: {
slug: {
equalTo: $actorSlug,
},
networkId: {
isNull: true,
},
}) {
actor(id: $actorId) {
id
name
slug
@@ -177,7 +170,7 @@ function initActorActions(store, _router) {
}
}
`, {
actorSlug,
actorId,
limit,
after,
before,
@@ -280,7 +273,7 @@ function initActorActions(store, _router) {
}
return {
fetchActorBySlug,
fetchActorById,
fetchActors,
fetchActorReleases,
};