mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
54 lines
2.0 KiB
GraphQL
54 lines
2.0 KiB
GraphQL
"""
|
|
Represents the link between a song and an artist or membership.
|
|
|
|
For example, Liella has performed using memberships, with its members credited.
|
|
"""
|
|
type Performance {
|
|
"The primary key of the resource"
|
|
id: Int! @rename(attribute: "performance_id")
|
|
"The song the artist is performing"
|
|
song: Song @belongsTo
|
|
"The artist or membership performing"
|
|
artist: PerformanceArtistUnion! @morphTo
|
|
"The alias the artist is using for this performance"
|
|
alias: String
|
|
"The character the artist is performing as"
|
|
as: String
|
|
"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")
|
|
}
|
|
|
|
"Represents the resource type performing"
|
|
union PerformanceArtistUnion = Artist | Membership
|
|
|
|
enum PerformanceColumnsOrderable {
|
|
ID @enum(value: "performance_id")
|
|
ALIAS
|
|
AS
|
|
CREATED_AT
|
|
UPDATED_AT
|
|
DELETED_AT
|
|
}
|
|
|
|
extend type Query {
|
|
"Returns a listing of performance resources given fields."
|
|
performances(
|
|
alias: String @eq
|
|
as: String @eq
|
|
hasSong: [WhereHasConditions!] @whereHasConditions(relation: "song", columns: ["title"])
|
|
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: "PerformanceColumnsOrderable")
|
|
): [Performance!]!
|
|
@canModel(ability: "viewAny", injectArgs: true)
|
|
@softDeletes
|
|
@paginate
|
|
} |