mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-11-11 16:48:48 +01:00
56 lines
1.8 KiB
GraphQL
56 lines
1.8 KiB
GraphQL
#import Models/Admin/*.graphql
|
|
#import Models/Auth/*.graphql
|
|
#import Models/Document/*.graphql
|
|
#import Models/List/*.graphql
|
|
#import Models/List/External/*.graphql
|
|
#import Models/List/Playlist/*.graphql
|
|
#import Models/User/*.graphql
|
|
#import Models/Wiki/*.graphql
|
|
#import Models/Wiki/Anime/*.graphql
|
|
#import Models/Wiki/Anime/Theme/*.graphql
|
|
#import Models/Wiki/Song/*.graphql
|
|
#import Models/Wiki/Video/*.graphql
|
|
#import search.graphql
|
|
|
|
"A datetime and timezone string in ISO 8601 format `Y-m-dTH:i:sP`, e.g. `2020-04-20T13:53:12+02:00`."
|
|
scalar DateTimeTz @scalar(class: "Nuwave\\Lighthouse\\Schema\\Types\\Scalars\\DateTimeTz")
|
|
|
|
"""
|
|
Loose type that allows any value. Be careful when passing in large `Int` or `Float` literals,
|
|
as they may not be parsed correctly on the server side. Use `String` literals if you are
|
|
dealing with really large numbers to be on the safe side.
|
|
"""
|
|
scalar Mixed @scalar(class: "MLL\\GraphQLScalars\\MixedScalar")
|
|
|
|
"Represents a response containing a message."
|
|
type MessageResponse {
|
|
message: String!
|
|
}
|
|
|
|
type Mutation @guard {
|
|
ToggleLike(
|
|
entryId: Int
|
|
playlistId: String
|
|
): Like
|
|
@canModel(ability: "create", model: "App\\Models\\User\\Like")
|
|
@field(resolver: "App\\GraphQL\\Mutations\\User\\ToggleLikeMutation")
|
|
|
|
"Mark a video as watched."
|
|
Watch(
|
|
entryId: Int!
|
|
videoId: Int!
|
|
): WatchHistory
|
|
@canModel(ability: "create", model: "App\\Models\\User\\WatchHistory")
|
|
@field(resolver: "App\\GraphQL\\Mutations\\User\\WatchMutation")
|
|
}
|
|
|
|
"Indicates what fields are available at the top level of a query operation."
|
|
type Query {
|
|
"Returns a listing of resources that match a given search term."
|
|
search(
|
|
search: String!
|
|
first: Int
|
|
page: Int
|
|
): Search! @field(resolver: "App\\GraphQL\\Queries\\SearchQuery")
|
|
}
|