traxxx/assets/js/fragments.js

139 lines
2.2 KiB
JavaScript
Raw Normal View History

const siteFragment = `
site {
id
name
slug
url
network {
id
name
slug
url
}
}
`;
const releaseActorsFragment = `
actors: releasesActorsSortables(orderBy: GENDER_ASC) {
actor {
id
name
slug
birthdate
age
originCountry: countryByBirthCountryAlpha2 {
alpha2
name
alias
}
avatar: actorsAvatarByActorId {
media {
thumbnail
}
}
}
}
`;
const releaseTagsFragment = `
tags: releasesTags {
tag {
name
priority
slug
id
}
}
`;
const releasePosterFragment = `
poster: releasesPosterByReleaseId {
media {
index
path
thumbnail
comment
}
}
`;
const releasePhotosFragment = `
photos: releasesPhotos {
media {
index
path
thumbnail
comment
}
}
`;
const releaseTrailerFragment = `
trailer: releasesTrailerByReleaseId {
media {
index
path
thumbnail
}
}
`;
const releasesFragment = `
2019-12-18 01:42:55 +00:00
releases(
filter: {
date: {
lessThan: $before,
greaterThan: $after,
}
},
first: $limit,
orderBy: DATE_DESC,
) {
id
title
date
createdAt
url
${releaseActorsFragment}
${releaseTagsFragment}
${releasePosterFragment}
${siteFragment}
}
`;
const releaseFragment = `
release(id: $releaseId) {
id
title
description
date
duration
createdAt
shootId
url
${releaseActorsFragment}
${releaseTagsFragment}
${releasePosterFragment}
${releasePhotosFragment}
${releaseTrailerFragment}
${siteFragment}
studio {
id
name
slug
url
}
}
`;
export {
releaseActorsFragment,
releaseTagsFragment,
releasePosterFragment,
releasePhotosFragment,
releaseTrailerFragment,
releasesFragment,
releaseFragment,
siteFragment,
};