mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-10-24 11:39:21 +02:00
68 lines
2.3 KiB
GraphQL
68 lines
2.3 KiB
GraphQL
type PlaylistImageEdge {
|
|
node: Image!
|
|
"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 PlaylistColumnsOrderable {
|
|
ID @enum(value: "playlist_id")
|
|
NAME
|
|
DESCRIPTION
|
|
VISIBILITY
|
|
CREATED_AT
|
|
UPDATED_AT
|
|
DELETED_AT
|
|
}
|
|
|
|
extend type Query {
|
|
"Returns a playlist resource."
|
|
playlist(
|
|
id: String! @bind(class: "App\\Models\\List\\Playlist", column: "hashid")
|
|
): Playlist @first
|
|
@canModel(ability: "view", injectArgs: true)
|
|
}
|
|
|
|
extend type Mutation @guard {
|
|
createPlaylist(
|
|
name: String!
|
|
description: String
|
|
visibility: PlaylistVisibility!
|
|
): Playlist!
|
|
@canModel(ability: "create")
|
|
@validator(class: "App\\GraphQL\\Validators\\Mutation\\List\\Playlist\\CreatePlaylistValidator")
|
|
@field(resolver: "App\\GraphQL\\Mutations\\List\\PlaylistMutator@store")
|
|
|
|
|
|
updatePlaylist(
|
|
id: String! @bind(class: "App\\Models\\List\\Playlist", column: "hashid")
|
|
name: String
|
|
description: String
|
|
visibility: PlaylistVisibility
|
|
): Playlist!
|
|
@canModel(ability: "update", injectArgs: true)
|
|
@validator(class: "App\\GraphQL\\Validators\\Mutation\\List\\Playlist\\UpdatePlaylistValidator")
|
|
@field(resolver: "App\\GraphQL\\Mutations\\List\\PlaylistMutator@update")
|
|
|
|
|
|
deletePlaylist(
|
|
id: String! @bind(class: "App\\Models\\List\\Playlist", column: "hashid")
|
|
): Playlist!
|
|
@canModel(ability: "delete", injectArgs: true)
|
|
@field(resolver: "App\\GraphQL\\Mutations\\List\\PlaylistMutator@destroy")
|
|
|
|
|
|
restorePlaylist(
|
|
id: String! @bind(class: "App\\Models\\List\\Playlist", column: "hashid")
|
|
): Playlist!
|
|
@canModel(ability: "restore", injectArgs: true)
|
|
@field(resolver: "App\\GraphQL\\Mutations\\List\\PlaylistMutator@restore")
|
|
|
|
|
|
forceDeletePlaylist(
|
|
id: String! @bind(class: "App\\Models\\List\\Playlist", column: "hashid")
|
|
): MessageResponse!
|
|
@canModel(ability: "forceDelete", injectArgs: true, model: "App\\Models\\List\\Playlist")
|
|
@field(resolver: "App\\GraphQL\\Mutations\\List\\PlaylistMutator@forceDelete")
|
|
} |