Fixed Babel dependencies.
This commit is contained in:
@@ -21,7 +21,7 @@ function curateRelease(release) {
|
||||
}
|
||||
|
||||
function initReleasesActions(_store, _router) {
|
||||
async function fetchReleases({ _commit }) {
|
||||
async function fetchReleases({ _commit }, { limit = 100 }) {
|
||||
/*
|
||||
const releases = await get('/releases', {
|
||||
filter: store.state.ui.filter,
|
||||
@@ -31,8 +31,8 @@ function initReleasesActions(_store, _router) {
|
||||
*/
|
||||
|
||||
const { releases } = await graphql(`
|
||||
query Releases {
|
||||
releases(orderBy: DATE_DESC) {
|
||||
query Releases($limit:Int) {
|
||||
releases(first:$limit, orderBy: DATE_DESC) {
|
||||
id
|
||||
title
|
||||
description
|
||||
@@ -53,20 +53,14 @@ function initReleasesActions(_store, _router) {
|
||||
alias
|
||||
}
|
||||
avatar: actorsMediasByTargetId(condition: { role: "avatar" }) {
|
||||
id
|
||||
thumbnail
|
||||
path
|
||||
mime
|
||||
}
|
||||
}
|
||||
}
|
||||
poster: releasesMediasByTargetId(condition: { role: "poster" }) {
|
||||
mime
|
||||
id
|
||||
index
|
||||
path
|
||||
thumbnail
|
||||
role
|
||||
}
|
||||
tags: releasesTagsByTargetId {
|
||||
tag {
|
||||
@@ -90,7 +84,9 @@ function initReleasesActions(_store, _router) {
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
`, {
|
||||
limit,
|
||||
});
|
||||
|
||||
return releases.map(release => curateRelease(release));
|
||||
}
|
||||
@@ -121,36 +117,24 @@ function initReleasesActions(_store, _router) {
|
||||
alias
|
||||
}
|
||||
avatar: actorsMediasByTargetId(condition: { role: "avatar" }) {
|
||||
id
|
||||
thumbnail
|
||||
path
|
||||
mime
|
||||
}
|
||||
}
|
||||
}
|
||||
poster: releasesMediasByTargetId(condition: { role: "poster" }) {
|
||||
mime
|
||||
id
|
||||
index
|
||||
path
|
||||
thumbnail
|
||||
role
|
||||
}
|
||||
photos: releasesMediasByTargetId(condition: { role: "photo" }) {
|
||||
mime
|
||||
id
|
||||
index
|
||||
path
|
||||
thumbnail
|
||||
role
|
||||
}
|
||||
trailer: releasesMediasByTargetId(condition: { role: "trailer" }) {
|
||||
mime
|
||||
id
|
||||
index
|
||||
path
|
||||
thumbnail
|
||||
role
|
||||
}
|
||||
tags: releasesTagsByTargetId {
|
||||
tag {
|
||||
|
||||
Reference in New Issue
Block a user