forked from DebaucheryLibrarian/traxxx
297 lines
5.0 KiB
JavaScript
297 lines
5.0 KiB
JavaScript
const siteFragment = `
|
|
site: entity {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
network: parent {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
}
|
|
}
|
|
`;
|
|
|
|
const sitesFragment = `
|
|
sites {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
network {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
}
|
|
}
|
|
`;
|
|
|
|
const actorFields = `
|
|
id
|
|
name
|
|
slug
|
|
birthdate: dateOfBirth
|
|
age
|
|
gender
|
|
avatar: avatarMedia {
|
|
id
|
|
path
|
|
thumbnail
|
|
lazy
|
|
sfw: sfwMedia {
|
|
id
|
|
path
|
|
thumbnail
|
|
lazy
|
|
}
|
|
}
|
|
network: entity {
|
|
id
|
|
name
|
|
slug
|
|
}
|
|
originCountry: countryByBirthCountryAlpha2 {
|
|
alpha2
|
|
name
|
|
alias
|
|
}
|
|
`;
|
|
|
|
const releaseActorsFragment = `
|
|
actors: releasesActors(orderBy: ACTOR_BY_ACTOR_ID__GENDER_ASC) {
|
|
actor {
|
|
${actorFields}
|
|
}
|
|
}
|
|
`;
|
|
|
|
const releaseTagsFragment = `
|
|
tags: releasesTags(orderBy: TAG_BY_TAG_ID__PRIORITY_DESC) {
|
|
tag {
|
|
name
|
|
priority
|
|
slug
|
|
id
|
|
}
|
|
}
|
|
`;
|
|
|
|
const releasePosterFragment = `
|
|
poster: releasesPosterByReleaseId {
|
|
media {
|
|
index
|
|
path
|
|
thumbnail
|
|
lazy
|
|
comment
|
|
sfw: sfwMedia {
|
|
id
|
|
thumbnail
|
|
lazy
|
|
path
|
|
comment
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
const releaseCoversFragment = `
|
|
covers: releasesCovers {
|
|
media {
|
|
index
|
|
path
|
|
thumbnail
|
|
lazy
|
|
comment
|
|
sfw: sfwMedia {
|
|
id
|
|
thumbnail
|
|
lazy
|
|
path
|
|
comment
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
const releasePhotosFragment = `
|
|
photos: releasesPhotos {
|
|
media {
|
|
index
|
|
path
|
|
thumbnail
|
|
lazy
|
|
comment
|
|
sfw: sfwMedia {
|
|
id
|
|
thumbnail
|
|
lazy
|
|
path
|
|
comment
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
const releaseTrailerFragment = `
|
|
trailer: releasesTrailerByReleaseId {
|
|
media {
|
|
index
|
|
path
|
|
thumbnail
|
|
mime
|
|
}
|
|
}
|
|
`;
|
|
|
|
const releaseTeaserFragment = `
|
|
teaser: releasesTeaserByReleaseId {
|
|
media {
|
|
index
|
|
path
|
|
thumbnail
|
|
mime
|
|
}
|
|
}
|
|
`;
|
|
|
|
const releaseFields = `
|
|
id
|
|
title
|
|
date
|
|
slug
|
|
type
|
|
createdAt
|
|
url
|
|
${releaseActorsFragment}
|
|
${releaseTagsFragment}
|
|
${releasePosterFragment}
|
|
${releaseCoversFragment}
|
|
${siteFragment}
|
|
studio {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
}
|
|
isNew
|
|
`;
|
|
|
|
const releasesFragment = `
|
|
connection: releasesConnection(
|
|
filter: {
|
|
date: {
|
|
lessThan: $before,
|
|
greaterThan: $after,
|
|
}
|
|
releasesTagsConnection: {
|
|
none: {
|
|
tag: {
|
|
slug: {
|
|
in: $exclude
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
first: $limit,
|
|
offset: $offset,
|
|
orderBy: $orderBy,
|
|
) {
|
|
releases: nodes {
|
|
${releaseFields}
|
|
movieActors: movieActorsByMovieId(orderBy: ACTOR_BY_ACTOR_ID__GENDER_ASC) {
|
|
actor {
|
|
${actorFields}
|
|
}
|
|
}
|
|
movieTags: movieTagsByMovieId(orderBy: TAG_BY_TAG_ID__PRIORITY_DESC) {
|
|
tag {
|
|
id
|
|
name
|
|
slug
|
|
}
|
|
}
|
|
}
|
|
totalCount
|
|
}
|
|
`;
|
|
|
|
const releaseFragment = `
|
|
release(id: $releaseId) {
|
|
id
|
|
title
|
|
description
|
|
date
|
|
duration
|
|
createdAt
|
|
shootId
|
|
url
|
|
${releaseActorsFragment}
|
|
${releaseTagsFragment}
|
|
${releasePosterFragment}
|
|
${releasePhotosFragment}
|
|
${releaseCoversFragment}
|
|
${releaseTrailerFragment}
|
|
${releaseTeaserFragment}
|
|
${siteFragment}
|
|
movieActors: movieActorsByMovieId(orderBy: ACTOR_BY_ACTOR_ID__GENDER_ASC) {
|
|
actor {
|
|
${actorFields}
|
|
}
|
|
}
|
|
movieTags: movieTagsByMovieId(orderBy: TAG_BY_TAG_ID__PRIORITY_DESC) {
|
|
tag {
|
|
id
|
|
name
|
|
slug
|
|
}
|
|
}
|
|
movies: releasesMoviesBySceneId {
|
|
movie {
|
|
id
|
|
title
|
|
date
|
|
slug
|
|
createdAt
|
|
url
|
|
${releaseCoversFragment}
|
|
${siteFragment}
|
|
actors: movieActorsByMovieId {
|
|
actor {
|
|
id
|
|
name
|
|
slug
|
|
}
|
|
}
|
|
}
|
|
}
|
|
scenes: releasesMoviesByMovieId {
|
|
scene {
|
|
${releaseFields}
|
|
}
|
|
}
|
|
studio {
|
|
id
|
|
name
|
|
slug
|
|
url
|
|
}
|
|
}
|
|
`;
|
|
|
|
export {
|
|
releaseActorsFragment,
|
|
releaseFields,
|
|
releaseTagsFragment,
|
|
releasePosterFragment,
|
|
releasePhotosFragment,
|
|
releaseTrailerFragment,
|
|
releasesFragment,
|
|
releaseFragment,
|
|
siteFragment,
|
|
sitesFragment,
|
|
};
|