forked from DebaucheryLibrarian/traxxx
Added new tag filter stub.
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user