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 Name | Arguments | Description |
---|---|---|
allAbilities | Returns an array of Ability objects | |
allEggGroups | Returns an array of Egg Group objects | |
allGames | Returns an array of Game objects | |
allItems | Returns an array of Item objects | |
allLocations | Returns an array of Location objects | |
allMoves | Returns an array of Move objects | |
allPokemon | *limit: Int, *filter: Boolean | Returns 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) |
allRegions | Returns an array of Region objects | |
allTypes | Returns an array of Type objects |
*Optional query arguments
Example
1{2 allPokemon(limit: 3) {3 name4 }5}
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 Name | Arguments | Description |
---|---|---|
Ability | id: Int | Returns an object of type Ability |
EggGroup | id: Int | Returns an object of type EggGroup |
Game | id: Int | Returns an object of type Game |
Item | id: Int | Returns an object of type Item |
Location | id: Int | Returns an object of type Location |
Move | id: Int | Returns an object of type Move |
Pokemon | id: Int | Returns an object of type Pokemon |
Region | id: Int | Returns an object of type Region |
Type | id: Int | Returns an object of type Type |
Ability
Fields that can be queried for Ability
:
Field Name | Arguments | Return type | Description |
---|---|---|---|
id | -- | Integer | Returns the id of the ability |
name | -- | String | Returns the name of the ability |
is_hidden | -- | Boolean | Returns true if the ability is a "hidden" ability |
effect | -- | String | Returns a description of the effects of the ability |
description | -- | String | Returns a general description of the ability |
pokemon | -- | Pokemon | Returns an array of Pokemon objects of all the Pokémon that can have this ability |
Example
1{2 ability(id: 1) {3 name4 }5}
1{2 "data": {3 "ability": {4 "name": "Stench"5 }6 }7}
EggGroup
Fields that can be queried for EggGroup
:
Field Name | Arguments | Return type | Description |
---|---|---|---|
id | -- | Integer | Returns the id of the egg group |
name | -- | String | Returns the name of the egg group |
pokemon | -- | Pokemon | Returns an array of Pokemon objects that are of this egg group |
Example
1{2 eggGroup(id: 1) {3 name4 }5}
1{2 "data": {3 "eggGroup": {4 "name": "Monster"5 }6 }7}
Game
Fields that can be queried for Game
:
Field Name | Arguments | Return type | Description |
---|---|---|---|
id | -- | Integer | Returns the id of the egg group |
name | -- | String | Returns the name of the egg group |
generation | -- | String | Returns the generation of this game (i.e. "Generation I") |
regions | -- | Region | Returns an array of Region objects that are found in this game |
Example
1{2 game(id: 1) {3 name4 }5}
1{2 "data": {3 "game": {4 "name": "red"5 }6 }7}
Item
Fields that can be queried for Item
:
Field Name | Arguments | Return type | Description |
---|---|---|---|
id | -- | Integer | Returns the id of the item |
name | -- | String | Returns the name of the item |
effect | -- | String | Returns a description of the effect of the item |
description | -- | String | Returns a description of what the item is |
cost | -- | Integer | Returns the cost of the item in Poké Dollars |
bag_pocket | -- | String | Returns the name of the bag pocket that the item gets put in |
sprite | -- | String | Returns a url of the sprite image |
evolution_criteria_name | -- | String | Use 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
1{2 item(id: 11) {3 name4 }5}
1{2 "data": {3 "item": {4 "name": "Luxury Ball"5 }6 }7}
Location
Fields that can be queried for Location
:
Field Name | Arguments | Return type | Description |
---|---|---|---|
id | -- | Integer | Returns the id of the location |
name | -- | String | Returns the name of the location |
region | -- | Region | Returns a Region object for the region this location is found in |
games | -- | Game | Returns an array of Game objects for the games this location is found in |
pokemon | -- | Pokemon | Returns an array of Pokemon objects that are found at this location |
evolution_criteria_name | -- | String | Use 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
1{2 location(id: 48) {3 name4 }5}
1{2 "data": {3 "location": {4 "name": "sinnoh-route-217"5 }6 }7}
Move
Fields that can be queried for Move
:
Field Name | Arguments | Return type | Description |
---|---|---|---|
id | -- | Integer | Returns the id of the move |
name | -- | String | Returns the name of the move |
power | -- | Integer | Returns the base power of the move (returns 0 if the move has no base power) |
accuracy | -- | Integer | Returns the percent value of how likely this move is to be successful |
pp | -- | Integer | Returns the power points of this move (number of times this move can be used) |
priority | -- | Integer | Returns a value between -8 and 8. Sets the order in which moves are executed during battle. See Bulbapedia for greater details |
effect_chance | -- | Integer | Returns the percent value of how likely it is this moves effect will take effect |
effect | -- | String | Returns a description of the effect that the move can inflict |
ailment | -- | String | Returns the name of the ailment the move can inflict |
description | -- | String | Returns a description of what the move does |
damage_class | -- | String | Returns the name of what kind of move it is (i.e. status, physical, special) |
type | -- | Type | Returns a Type object of the move |
original_games | -- | Game | Returns an array of Game objects that this move originally debuted in |
learn_methods | -- | MoveLearnMethod | Use 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 | -- | String | Use 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
1{2 move(id: 5) {3 name4 }5}
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 Name | Arguments | Return type | Description |
---|---|---|---|
id | -- | Integer | Returns the id of the Pokémon |
name | -- | String | Returns the name of the Pokémon |
genus | -- | String | Returns the genus of the Pokémon (i.e. "Mouse Pokémon") |
weight | -- | Integer | Returns the weight of the Pokémon in hectograms |
height | -- | Integer | Returns the height of the Pokémon in decimeters |
nat_dex_num | -- | Integer | Returns the national Pokédex number of the Pokémon |
gender_rate | -- | Float | Returns the percent chance of this Pokémon being female (or -1 for genderless) |
generation | -- | String | Returns the generation this Pokémon debuted in (i.e. "Generation I") |
base_experience | -- | Integer | Returns the base experience gained for defeating this Pokémon |
base_happiness | -- | Integer | Returns the happiness when caught by a normal Pokéball (up to 255). The higher the number, the happier the Pokémon |
capture_rate | -- | Integer | Returns the base capture rate (up to 255). The higher the number, the easier the catch |
growth_rate | -- | Integer | Returns the rate at which this Pokémon species gains levels. |
is_default | -- | Boolean | Returns 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 | -- | Integer | Returns 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 | -- | String | Returns the shape of this Pokémon (i.e. upright, quadruped) |
is_baby | -- | Boolean | Returns true if this Pokémon is a baby |
color | -- | String | Returns the name of the general color of this Pokémon |
evolution_trigger | -- | String | Returns 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 | -- | DexEntry | Returns an array of DexEntry objects |
types | -- | Type | Returns an array of Type objects |
variants | -- | Pokemon | Returns an array of Pokemon objects for all of the Pokémon that are variants of the initially requested Pokémon |
dominant_color | -- | Dominant_Color | Returns a DominantColor object |
egg_groups | -- | EggGroup | Returns an array of EggGroup objects for all of the egg groups that this Pokémon belongs to |
locations | -- | Location | Returns an array of Location objects for all of the different locations that this Pokémon can be found at |
games | -- | Game | Returns an array of Game objects for all of the different games that this Pokémon can be found in |
evolves_to | -- | Pokemon | Returns an array of Pokemon objects for the Pokémon that this Pokémon can evolve into |
evolves_from | -- | Pokemon | Returns aPokemon object for the Pokémon that this Pokémon evolved from |
evolution_criteria | -- | EvolutionCriteria | Returns an array of EvolutionCriteria objects for the criteria that must have been met for this Pokémon to have evolved |
base_stats | -- | Stats | Returns a Stat object for this Pokémon; returns null if database is incomplete |
moves | *game: String | Move | Returns 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: String | Ability | Returns 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
1{2 pokemon(id: 133) {3 name4 }5}
1{2 "data": {3 "pokemon": {4 "name": "eevee"5 }6 }7}
Region
Fields that can be queried for Region
:
Field Name | Arguments | Return type | Description |
---|---|---|---|
id | -- | Integer | Returns the id of the region |
name | -- | String | Returns the name of the region |
games | -- | Game | Returns an array of Game objects that this region is found in |
locations | -- | Location | Returns an array of Location objects that are found in this region |
Example
1{2 region(id: 4) {3 name4 }5}
1{2 "data": {3 "region": {4 "name": "Sinnoh"5 }6 }7}
Type
Fields that can be queried for Type
:
Field Name | Arguments | Return type | Description |
---|---|---|---|
id | -- | Integer | Returns the id of the type |
name | -- | String | Returns the name of the type (i.e. Grass, Dark, Water) |
double_damage_from | -- | Type | Returns an array of Type objects that this type takes 2x damage from |
double_damage_to | -- | Type | Returns an array of Type objects that this type gives 2x damage to |
half_damage_from | -- | Type | Returns an array of Type objects that this type takes 0.5x damage from |
half_damage_to | -- | Type | Returns an array of Type objects that this type gives 0.5x damage to |
no_damage_from | -- | Type | Returns an array of Type objects that this type takes no damage from |
no_damage_to | -- | Type | Returns an array of Type objects that this type gives no damage to |
pokemon | -- | Pokemon | Returns an array of Pokemon objects that are of this type |
evolution_criteria_name | -- | String | Use 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
1{2 type(id: 17) {3 name4 }5}
1{2 "data": {3 "type": {4 "name": "Dark"5 }6 }7}