Skip to content

Latest commit

 

History

History
83 lines (76 loc) · 1.37 KB

README.md

File metadata and controls

83 lines (76 loc) · 1.37 KB

A GraphQL API for IMDB

Schema

schema {
  query: Query
}

type Query {
  title(imdbID: String!): Title
  movie(imdbID: String!): Movie
  series(imdbID: String!): Series
  episode(imdbID: String!): Episode
  search(title: String!, types: [TitleType], result: Int = 5): [Title]
}

interface Title {
  imdbID: String
  titleType: String
  primaryTitle: String
  originalTitle: String
  isAdult: Int
  startYear: Int
  endYear: Int
  runtime: Int
  genres: [String]
  averageRating: Float
  numVotes: Int
}

type Movie implements Title {
  imdbID: String
  titleType: String
  primaryTitle: String
  originalTitle: String
  isAdult: Int
  startYear: Int
  endYear: Int
  runtime: Int
  genres: [String]
  averageRating: Float
  numVotes: Int
}

type Series implements Title {
  imdbID: String
  titleType: String
  primaryTitle: String
  originalTitle: String
  isAdult: Int
  startYear: Int
  endYear: Int
  runtime: Int
  genres: [String]
  averageRating: Float
  numVotes: Int
  totalSeasons: Int
  episodes(season: [Int]): [Episode]
}

type Episode implements Title {
  imdbID: String
  titleType: String
  primaryTitle: String
  originalTitle: String
  isAdult: Int
  startYear: Int
  endYear: Int
  runtime: Int
  genres: [String]
  averageRating: Float
  numVotes: Int
  seasonNumber: Int
  episodeNumber: Int
  series: Series
}

enum TitleType {
  MOVIE
  SERIES
  EPISODE
}