martinseal1987
martinseal1987

Reputation: 2428

PokeApi Graph QL how to get varieties?

In the PokeApi REST API Pokemon varieties are returned inside the species model on the varieties field at the endpoint https://pokeapi.co/api/v2/pokemon-species/{id or name}/

However I can't seem to find them in the new GraphQL console https://beta.pokeapi.co/graphql/console/

anybody know where this model lives?

Upvotes: 0

Views: 173

Answers (1)

martinseal1987
martinseal1987

Reputation: 2428

Found it

query MyQuery {
  pokemon_v2_pokemon(where: {id: {_eq: 6}}) {
   id
    pokemon_v2_pokemonspecy {
      pokemon_v2_pokemons {
        pokemon_v2_pokemonforms {
          name
        }
      }
    }
  }
}

Upvotes: 0

Related Questions