Associating actors without network.
This commit is contained in:
@@ -8,6 +8,10 @@ import { curateRelease } from '../curate';
|
||||
import getDateRange from '../get-date-range';
|
||||
|
||||
function curateActor(actor) {
|
||||
if (!actor) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const curatedActor = {
|
||||
...actor,
|
||||
height: actor.heightMetric && {
|
||||
@@ -49,7 +53,7 @@ function initActorActions(store, _router) {
|
||||
async function fetchActorBySlug({ _commit }, { actorSlug, limit = 100, range = 'latest' }) {
|
||||
const { before, after, orderBy } = getDateRange(range);
|
||||
|
||||
const { actor } = await graphql(`
|
||||
const { actors: [actor] } = await graphql(`
|
||||
query Actor(
|
||||
$actorSlug: String!
|
||||
$limit:Int = 1000,
|
||||
@@ -58,7 +62,14 @@ function initActorActions(store, _router) {
|
||||
$orderBy:[ReleasesActorsOrderBy!]
|
||||
$exclude: [String!]
|
||||
) {
|
||||
actor: actorBySlug(slug: $actorSlug) {
|
||||
actors(filter: {
|
||||
slug: {
|
||||
equalTo: $actorSlug,
|
||||
},
|
||||
networkId: {
|
||||
isNull: true,
|
||||
},
|
||||
}) {
|
||||
id
|
||||
name
|
||||
slug
|
||||
@@ -84,11 +95,13 @@ function initActorActions(store, _router) {
|
||||
name
|
||||
slug
|
||||
}
|
||||
avatar: actorsAvatarByActorId {
|
||||
media {
|
||||
thumbnail
|
||||
path
|
||||
copyright
|
||||
actorsProfiles {
|
||||
actorsAvatarByProfileId {
|
||||
media {
|
||||
path
|
||||
thumbnail
|
||||
copyright
|
||||
}
|
||||
}
|
||||
}
|
||||
photos: actorsPhotos {
|
||||
@@ -225,9 +238,13 @@ function initActorActions(store, _router) {
|
||||
name
|
||||
slug
|
||||
}
|
||||
avatar: actorsAvatarByActorId {
|
||||
media {
|
||||
thumbnail
|
||||
actorsProfiles {
|
||||
actorsAvatarByProfileId {
|
||||
media {
|
||||
path
|
||||
thumbnail
|
||||
copyright
|
||||
}
|
||||
}
|
||||
}
|
||||
birthCountry: countryByBirthCountryAlpha2 {
|
||||
|
||||
Reference in New Issue
Block a user