mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
101 lines
3.7 KiB
GraphQL
101 lines
3.7 KiB
GraphQL
"""
|
|
Represents a WebM of an anime theme.
|
|
|
|
For example, the video Bakemonogatari-OP1.webm represents the WebM of the Bakemonogatari OP1 theme.
|
|
"""
|
|
type Video {
|
|
"The primary key of the resource"
|
|
id: Int! @rename(attribute: "video_id")
|
|
"The basename of the file in storage"
|
|
basename: String!
|
|
"The filename of the file in storage"
|
|
filename: String!
|
|
"Does the video include subtitles of song lyrics?"
|
|
lyrics: Boolean!
|
|
"The media type of the file in storage"
|
|
mimetype: String
|
|
"Is the video creditless?"
|
|
nc: Boolean!
|
|
"The degree to which the sequence and episode content overlap"
|
|
overlap: VideoOverlap @localizedEnum
|
|
"The path of the file in storage"
|
|
path: String!
|
|
"The frame height of the file in storage"
|
|
resolution: Int
|
|
"The size of the file in storage in Bytes"
|
|
size: Int
|
|
"Where did this video come from?"
|
|
source: VideoSource @localizedEnum
|
|
"Does the video include subtitles of dialogue?"
|
|
subbed: Boolean!
|
|
"Is the video an uncensored version of a censored sequence?"
|
|
uncen: Boolean!
|
|
"The attributes used to distinguish the file within the context of a theme"
|
|
tags: String @field(resolver: "App\\GraphQL\\Resolvers\\ImplodeArrayResolver@resolve")
|
|
"The URL to stream the file from storage"
|
|
link: String!
|
|
"The number of views recorded for the resource"
|
|
viewsCount: Int! @with(relation: "viewAggregate") @field(resolver: "App\\GraphQL\\Resolvers\\ViewsCountResolver@resolve")
|
|
animethemeentries: [AnimeThemeEntry] @belongsToMany(type: CONNECTION)
|
|
videoscript: VideoScript @hasOne
|
|
"The date that the resource was created"
|
|
createdAt: DateTimeTz @rename(attribute: "created_at")
|
|
"The date that the resource was last modified"
|
|
updatedAt: DateTimeTz @rename(attribute: "updated_at")
|
|
"The date that the resource was deleted"
|
|
deletedAt: DateTimeTz @rename(attribute: "deleted_at")
|
|
}
|
|
|
|
"Default edge to use in simple belongs to many relationships"
|
|
type VideoEdge {
|
|
node: Video!
|
|
"The date that the resource was last modified"
|
|
createdAt: DateTimeTz @field(resolver: "App\\GraphQL\\Resolvers\\PivotResolver@resolve")
|
|
"The date that the resource was deleted"
|
|
updatedAt: DateTimeTz @field(resolver: "App\\GraphQL\\Resolvers\\PivotResolver@resolve")
|
|
}
|
|
|
|
enum VideoColumnsOrderable {
|
|
ID @enum(value: "video_id")
|
|
FILENAME
|
|
BASENAME
|
|
LYRICS
|
|
NC
|
|
OVERLAP
|
|
RESOLUTION
|
|
SIZE
|
|
SOURCE
|
|
SUBBED
|
|
TAGS
|
|
UNCEN
|
|
CREATED_AT
|
|
UPDATED_AT
|
|
DELETED_AT
|
|
}
|
|
|
|
extend type Query {
|
|
"Returns a listing of video resources given fields."
|
|
videos(
|
|
isLyrics: Boolean @eq
|
|
isNc: Boolean @eq
|
|
isSubbed: Boolean @eq
|
|
isUncen: Boolean @eq
|
|
overlap: [VideoOverlap] @in
|
|
source: [VideoSource] @in
|
|
resolution_in: [Int] @in(key: "resolution")
|
|
resolution_lesser: Int @where(key: "resolution", operator: "<")
|
|
resolution_greater: Int @where(key: "resolution", operator: ">")
|
|
size_lesser: Int @where(key: "size", operator: "<")
|
|
size_greater: Int @where(key: "size", operator: ">")
|
|
createdAt_lesser: DateTimeTz @where(key: "created_at", operator: "<")
|
|
createdAt_greater: DateTimeTz @where(key: "created_at", operator: ">")
|
|
updatedAt_lesser: DateTimeTz @where(key: "updated_at", operator: "<")
|
|
updatedAt_greater: DateTimeTz @where(key: "updated_at", operator: ">")
|
|
deletedAt_lesser: DateTimeTz @where(key: "deleted_at", operator: "<")
|
|
deletedAt_greater: DateTimeTz @where(key: "deleted_at", operator: ">")
|
|
orderBy: _ @orderBy(columnsEnum: "VideoColumnsOrderable")
|
|
): [Video!]!
|
|
@canModel(ability: "viewAny", injectArgs: true)
|
|
@softDeletes
|
|
@paginate
|
|
} |