169 lines
2.6 KiB
JavaScript
169 lines
2.6 KiB
JavaScript
const siteFragment = `
|
|
site {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
independent
|
|
network {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
}
|
|
}
|
|
`;
|
|
|
|
const sitesFragment = `
|
|
sites {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
independent
|
|
network {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
}
|
|
}
|
|
`;
|
|
|
|
const releaseActorsFragment = `
|
|
actors: releasesActors(orderBy: ACTOR_BY_ACTOR_ID__GENDER_ASC) {
|
|
actor {
|
|
id
|
|
name
|
|
slug
|
|
birthdate
|
|
age
|
|
gender
|
|
originCountry: countryByBirthCountryAlpha2 {
|
|
alpha2
|
|
name
|
|
alias
|
|
}
|
|
avatar: actorsAvatarByActorId {
|
|
media {
|
|
thumbnail
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
const releaseTagsFragment = `
|
|
tags: releasesTags(orderBy: TAG_BY_TAG_ID__PRIORITY_DESC) {
|
|
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 releaseFields = `
|
|
id
|
|
title
|
|
date
|
|
createdAt
|
|
url
|
|
${releaseActorsFragment}
|
|
${releaseTagsFragment}
|
|
${releasePosterFragment}
|
|
${siteFragment}
|
|
studio {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
}
|
|
`;
|
|
|
|
const releasesFragment = `
|
|
releases(
|
|
filter: {
|
|
date: {
|
|
lessThan: $before,
|
|
greaterThan: $after,
|
|
}
|
|
},
|
|
first: $limit,
|
|
orderBy: $orderBy,
|
|
) {
|
|
${releaseFields}
|
|
}
|
|
`;
|
|
|
|
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,
|
|
releaseFields,
|
|
releaseTagsFragment,
|
|
releasePosterFragment,
|
|
releasePhotosFragment,
|
|
releaseTrailerFragment,
|
|
releasesFragment,
|
|
releaseFragment,
|
|
siteFragment,
|
|
sitesFragment,
|
|
};
|