Dex Docs

Base Queries

Base Queries

For the base queries, there are options to query for all of the entries for certain types or to query for a single entry.

All code snippet examples purposely query few fields for brevity's sake. For a more hands visual of the query outputs, head on over to the GraphQL Playground!

Querying all entries

Anything that can be queried for a single type (i.e. Ability, Pokemon, etc) can be queried for the "all" base queries as well.

Field NameArgumentsDescription
allAbilitiesReturns an array of Ability objects
allEggGroupsReturns an array of Egg Group objects
allGamesReturns an array of Game objects
allItemsReturns an array of Item objects
allLocationsReturns an array of Location objects
allMovesReturns an array of Move objects
allPokemon*limit: Int, *filter: BooleanReturns an array of Pokemon objects; limit caps the number of Pokemon that are returned; filter determines if only "default" forms are returned or if only "alternate" forms are returned (initialized to false to only show "default" forms)
allRegionsReturns an array of Region objects
allTypesReturns an array of Type objects

*Optional query arguments

Example

query
1{
2 allPokemon(limit: 3) {
3 name
4 }
5}
result
1{
2 "data": {
3 "allPokemon": [
4 {
5 "name": "bulbasaur"
6 },
7 {
8 "name": "ivysaur"
9 },
10 {
11 "name": "venusaur"
12 }
13 ]
14 }
15}

Querying individual entries

Aside from being able to request a list of all of the entries of a particular type, there are also base queries to request individual entries based on their id.

Field NameArgumentsDescription
Abilityid: IntReturns an object of type Ability
EggGroupid: IntReturns an object of type EggGroup
Gameid: IntReturns an object of type Game
Itemid: IntReturns an object of type Item
Locationid: IntReturns an object of type Location
Moveid: IntReturns an object of type Move
Pokemonid: IntReturns an object of type Pokemon
Regionid: IntReturns an object of type Region
Typeid: IntReturns an object of type Type

Ability

Fields that can be queried for Ability:

Field NameArgumentsReturn typeDescription
id--IntegerReturns the id of the ability
name--StringReturns the name of the ability
is_hidden--BooleanReturns true if the ability is a "hidden" ability
effect--StringReturns a description of the effects of the ability
description--StringReturns a general description of the ability
pokemon--PokemonReturns an array of Pokemon objects of all the Pokémon that can have this ability

Example

query
1{
2 ability(id: 1) {
3 name
4 }
5}
result
1{
2 "data": {
3 "ability": {
4 "name": "Stench"
5 }
6 }
7}

EggGroup

Fields that can be queried for EggGroup:

Field NameArgumentsReturn typeDescription
id--IntegerReturns the id of the egg group
name--StringReturns the name of the egg group
pokemon--PokemonReturns an array of Pokemon objects that are of this egg group

Example

query
1{
2 eggGroup(id: 1) {
3 name
4 }
5}
result
1{
2 "data": {
3 "eggGroup": {
4 "name": "Monster"
5 }
6 }
7}

Game

Fields that can be queried for Game:

Field NameArgumentsReturn typeDescription
id--IntegerReturns the id of the egg group
name--StringReturns the name of the egg group
generation--StringReturns the generation of this game (i.e. "Generation I")
regions--RegionReturns an array of Region objects that are found in this game

Example

query
1{
2 game(id: 1) {
3 name
4 }
5}
result
1{
2 "data": {
3 "game": {
4 "name": "red"
5 }
6 }
7}

Item

Fields that can be queried for Item:

Field NameArgumentsReturn typeDescription
id--IntegerReturns the id of the item
name--StringReturns the name of the item
effect--StringReturns a description of the effect of the item
description--StringReturns a description of what the item is
cost--IntegerReturns the cost of the item in Poké Dollars
bag_pocket--StringReturns the name of the bag pocket that the item gets put in
sprite--StringReturns a url of the sprite image
evolution_criteria_name--StringUse in an evolution_criteria query: returns the name of the evolution criteria that must have been met for the Pokémon to have evolved

Example

query
1{
2 item(id: 11) {
3 name
4 }
5}
result
1{
2 "data": {
3 "item": {
4 "name": "Luxury Ball"
5 }
6 }
7}

Location

Fields that can be queried for Location:

Field NameArgumentsReturn typeDescription
id--IntegerReturns the id of the location
name--StringReturns the name of the location
region--RegionReturns a Region object for the region this location is found in
games--GameReturns an array of Game objects for the games this location is found in
pokemon--PokemonReturns an array of Pokemon objects that are found at this location
evolution_criteria_name--StringUse in an evolution_criteria query: returns the name of the evolution criteria that must have been met for the Pokémon to have evolved

Example

query
1{
2 location(id: 48) {
3 name
4 }
5}
result
1{
2 "data": {
3 "location": {
4 "name": "sinnoh-route-217"
5 }
6 }
7}

Move

Fields that can be queried for Move:

Field NameArgumentsReturn typeDescription
id--IntegerReturns the id of the move
name--StringReturns the name of the move
power--IntegerReturns the base power of the move (returns 0 if the move has no base power)
accuracy--IntegerReturns the percent value of how likely this move is to be successful
pp--IntegerReturns the power points of this move (number of times this move can be used)
priority--IntegerReturns a value between -8 and 8. Sets the order in which moves are executed during battle. See Bulbapedia for greater details
effect_chance--IntegerReturns the percent value of how likely it is this moves effect will take effect
effect--StringReturns a description of the effect that the move can inflict
ailment--StringReturns the name of the ailment the move can inflict
description--StringReturns a description of what the move does
damage_class--StringReturns the name of what kind of move it is (i.e. status, physical, special)
type--TypeReturns a Type object of the move
original_games--GameReturns an array of Game objects that this move originally debuted in
learn_methods--MoveLearnMethodUse in a moves query on a Pokemon type: returns an array of MoveLearnMethod types for how a Pokémon learns this move
evolution_criteria_name--StringUse in an evolution_criteria query on a Pokemon type: returns the name of the evolution criteria that must have been met for the Pokémon to have evolved

Example

query
1{
2 move(id: 5) {
3 name
4 }
5}
result
1{
2 "data": {
3 "move": {
4 "name": "Mega Punch"
5 }
6 }
7}

Pokemon

Below are the different fields that can be queried for the Pokemon type:

Field NameArgumentsReturn typeDescription
id--IntegerReturns the id of the Pokémon
name--StringReturns the name of the Pokémon
genus--StringReturns the genus of the Pokémon (i.e. "Mouse Pokémon")
weight--IntegerReturns the weight of the Pokémon in hectograms
height--IntegerReturns the height of the Pokémon in decimeters
nat_dex_num--IntegerReturns the national Pokédex number of the Pokémon
gender_rate--FloatReturns the percent chance of this Pokémon being female (or -1 for genderless)
generation--StringReturns the generation this Pokémon debuted in (i.e. "Generation I")
base_experience--IntegerReturns the base experience gained for defeating this Pokémon
base_happiness--IntegerReturns the happiness when caught by a normal Pokéball (up to 255). The higher the number, the happier the Pokémon
capture_rate--IntegerReturns the base capture rate (up to 255). The higher the number, the easier the catch
growth_rate--IntegerReturns the rate at which this Pokémon species gains levels.
is_default--BooleanReturns true if this Pokémon is the default form. Returns false if it's a variant (i.e. alola, mega evolution, alternate form)
hatch_counter--IntegerReturns the initial hatch counter: one must walk 255 × (hatch_counter + 1) steps before this Pokémon's egg hatches, unless utilizing bonuses like the Flame Body ability
shape--StringReturns the shape of this Pokémon (i.e. upright, quadruped)
is_baby--BooleanReturns true if this Pokémon is a baby
color--StringReturns the name of the general color of this Pokémon
evolution_trigger--StringReturns what triggered this Pokémon to evolve from its previous evolution stage; returns null if this Pokémon didn't evolve from anything
pokedex_entries--DexEntryReturns an array of DexEntry objects
types--TypeReturns an array of Type objects
variants--PokemonReturns an array of Pokemon objects for all of the Pokémon that are variants of the initially requested Pokémon
dominant_color--Dominant_ColorReturns a DominantColor object
egg_groups--EggGroupReturns an array of EggGroup objects for all of the egg groups that this Pokémon belongs to
locations--LocationReturns an array of Location objects for all of the different locations that this Pokémon can be found at
games--GameReturns an array of Game objects for all of the different games that this Pokémon can be found in
evolves_to--PokemonReturns an array of Pokemon objects for the Pokémon that this Pokémon can evolve into
evolves_from--PokemonReturns aPokemon object for the Pokémon that this Pokémon evolved from
evolution_criteria--EvolutionCriteriaReturns an array of EvolutionCriteria objects for the criteria that must have been met for this Pokémon to have evolved
base_stats--StatsReturns a Stat object for this Pokémon; returns null if database is incomplete
moves*game: StringMoveReturns an array of Move objects that this Pokémon can learn; can optionally request the moves by which game they can be learned in
abilities*game: StringAbilityReturns an array of Ability objects that this Pokémon can have; can optionally request the abilities by which game the Pokémon can have them

*Optional query arguments

Example

query
1{
2 pokemon(id: 133) {
3 name
4 }
5}
result
1{
2 "data": {
3 "pokemon": {
4 "name": "eevee"
5 }
6 }
7}

Region

Fields that can be queried for Region:

Field NameArgumentsReturn typeDescription
id--IntegerReturns the id of the region
name--StringReturns the name of the region
games--GameReturns an array of Game objects that this region is found in
locations--LocationReturns an array of Location objects that are found in this region

Example

query
1{
2 region(id: 4) {
3 name
4 }
5}
result
1{
2 "data": {
3 "region": {
4 "name": "Sinnoh"
5 }
6 }
7}

Type

Fields that can be queried for Type:

Field NameArgumentsReturn typeDescription
id--IntegerReturns the id of the type
name--StringReturns the name of the type (i.e. Grass, Dark, Water)
double_damage_from--TypeReturns an array of Type objects that this type takes 2x damage from
double_damage_to--TypeReturns an array of Type objects that this type gives 2x damage to
half_damage_from--TypeReturns an array of Type objects that this type takes 0.5x damage from
half_damage_to--TypeReturns an array of Type objects that this type gives 0.5x damage to
no_damage_from--TypeReturns an array of Type objects that this type takes no damage from
no_damage_to--TypeReturns an array of Type objects that this type gives no damage to
pokemon--PokemonReturns an array of Pokemon objects that are of this type
evolution_criteria_name--StringUse in an evolution_criteria query: returns the name of the evolution criteria that must have been met for the Pokémon to have evolved

Example

query
1{
2 type(id: 17) {
3 name
4 }
5}
result
1{
2 "data": {
3 "type": {
4 "name": "Dark"
5 }
6 }
7}
Edit this page on GitHub