type GET_search_person_KnownForEntry {
  adult: Boolean
  backdrop_path: String
  first_air_date: Date
  genre_ids: [Int]
  id: Int
  media_type: String
  name: String
  origin_country: [String]
  original_language: String
  original_name: String
  original_title: String
  overview: String
  popularity: Float
  poster_path: String
  release_date: Date
  title: String
  video: Boolean
  vote_average: Float
  vote_count: Int
}

type GET_search_person_ResultsEntry {
  adult: Boolean
  gender: Int
  id: Int
  known_for: [GET_search_person_KnownForEntry]
  known_for_department: String
  name: String
  original_name: String
  popularity: Float
  profile_path: String
}

type GET_search_person_Root {
  page: Int
  results: [GET_search_person_ResultsEntry]
  total_pages: Int
  total_results: Int
}

type Query {
  GET_search_person(
    query: String
    tmdb_access_token: String!
  ): GET_search_person_Root
    @rest(
      endpoint: "https://api.themoviedb.org/3/search/person"
      headers: [{ name: "authorization", value: "Bearer $tmdb_access_token;" }]
    )
}
type GET_person__person_id__movie_credits_CastEntry {
  adult: Boolean
  backdrop_path: String
  character: String
  credit_id: String
  genre_ids: [Int]
  id: Int
  order: Int
  original_language: String
  original_title: String
  overview: String
  popularity: Float
  poster_path: String
  release_date: String
  title: String
  video: Boolean
  vote_average: Float
  vote_count: Int
}

type GET_person__person_id__movie_credits_CrewEntry {
  adult: Boolean
  backdrop_path: String
  credit_id: String
  department: String
  genre_ids: [Int]
  id: Int
  job: String
  original_language: String
  original_title: String
  overview: String
  popularity: Float
  poster_path: String
  release_date: String
  title: String
  video: Boolean
  vote_average: Float
  vote_count: Int
}

type GET_person__person_id__movie_credits_Root {
  cast: [GET_person__person_id__movie_credits_CastEntry]
  crew: [GET_person__person_id__movie_credits_CrewEntry]
  id: Int
}

type Query {
  GET_person__person_id__movie_credits(
    person_id: String!
    tmdb_access_token: String!
  ): GET_person__person_id__movie_credits_Root
    @rest(
      endpoint: "https://api.themoviedb.org/3/person/$person_id;/movie_credits"
      headers: [{ name: "authorization", value: "Bearer $tmdb_access_token;" }]
    )
}
