# This file was generated based on "schema.json". Do not edit manually.

schema {
    query: Query
}

type Character {
    "Time at which the character was created in the database."
    created: String
    "Episodes in which this character appeared."
    episode: [Episode]!
    "The gender of the character ('Female', 'Male', 'Genderless' or 'unknown')."
    gender: String
    "The id of the character."
    id: ID
    """

    Link to the character's image.
    All images are 300x300px and most are medium shots or portraits since they are intended to be used as avatars.
    """
    image: String
    "The character's last known location"
    location: Location
    "The name of the character."
    name: String
    "The character's origin location"
    origin: Location
    "The species of the character."
    species: String
    "The status of the character ('Alive', 'Dead' or 'unknown')."
    status: String
    "The type or subspecies of the character."
    type: String
}

type Characters {
    info: Info
    results: [Character]
}

type Episode {
    "The air date of the episode."
    air_date: String
    "List of characters who have been seen in the episode."
    characters: [Character]!
    "Time at which the episode was created in the database."
    created: String
    "The code of the episode."
    episode: String
    "The id of the episode."
    id: ID
    "The name of the episode."
    name: String
}

type Episodes {
    info: Info
    results: [Episode]
}

type Info {
    "The length of the response."
    count: Int
    "Number of the next page (if it exists)"
    next: Int
    "The amount of pages."
    pages: Int
    "Number of the previous page (if it exists)"
    prev: Int
}

type Location {
    "Time at which the location was created in the database."
    created: String
    "The dimension in which the location is located."
    dimension: String
    "The id of the location."
    id: ID
    "The name of the location."
    name: String
    "List of characters who have been last seen in the location."
    residents: [Character]!
    "The type of the location."
    type: String
}

type Locations {
    info: Info
    results: [Location]
}

type Query {
    "Get a specific character by ID"
    character(id: ID!): Character
    "Get the list of all characters"
    characters(filter: FilterCharacter, page: Int): Characters
    "Get a list of characters selected by ids"
    charactersByIds(ids: [ID!]!): [Character]
    "Get a specific episode by ID"
    episode(id: ID!): Episode
    "Get the list of all episodes"
    episodes(filter: FilterEpisode, page: Int): Episodes
    "Get a list of episodes selected by ids"
    episodesByIds(ids: [ID!]!): [Episode]
    "Get a specific locations by ID"
    location(id: ID!): Location
    "Get the list of all locations"
    locations(filter: FilterLocation, page: Int): Locations
    "Get a list of locations selected by ids"
    locationsByIds(ids: [ID!]!): [Location]
}

enum CacheControlScope {
    PRIVATE
    PUBLIC
}

"The `Upload` scalar type represents a file upload."
scalar Upload

input FilterCharacter {
    gender: String
    name: String
    species: String
    status: String
    type: String
}

input FilterEpisode {
    episode: String
    name: String
}

input FilterLocation {
    dimension: String
    name: String
    type: String
}
