Files
2026-07-09 14:04:08 -03:00

77 lines
2.2 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")
"""
A partial date encoded as an integer in YYYYMMDD format.
Unknown parts are represented with 00:
- 20260709 = July 9, 2026
- 20260700 = July 2026
- 20260000 = 2026
Null means the date is unknown.
"""
scalar FuzzyDateInt @scalar(class: "App\\GraphQL\\Scalars\\FuzzyDateInt")
"Represents a response containing a message."
type MessageResponse {
message: String!
}
"""
A fuzzy date in YYYYMMDD format.
"""
type FuzzyDate {
year: Int
month: Int
day: Int
}
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")
}