type GET_search_Artists {
  href: String
  items: [GET_search_ItemsEntry]
  limit: Int
  next: String
  offset: Int
  """
  Field "previous" is defined as JSON since its value was always 'null'
  """
  previous: JSON
  total: Int
}

type GET_search_ExternalUrls {
  spotify: String
}

type GET_search_Followers {
  """
  Field "href" is defined as JSON since its value was always 'null'
  """
  href: JSON
  total: Int
}

type GET_search_ImagesEntry {
  height: Int
  url: String
  width: Int
}

type GET_search_ItemsEntry {
  external_urls: GET_search_ExternalUrls
  followers: GET_search_Followers
  genres: [String]
  href: String
  id: String
  images: [GET_search_ImagesEntry]
  name: String
  popularity: Int
  type: String
  uri: String
}

type GET_search_Root {
  artists: GET_search_Artists
}

type Query {
  GET_search(
    q: String
    spotify_access_token: String!
    type: String
  ): GET_search_Root
    @rest(
      endpoint: "https://api.spotify.com/v1/search"
      headers: [
        { name: "authorization", value: "Bearer $spotify_access_token;" }
      ]
    )
}
