Home

Awesome

🔴 The Unofficial GraphQL for PokeAPI

<p align="center"> <img height="200" src="https://raw.githubusercontent.com/PokeAPI/media/master/logo/pokeapi.svg?sanitize=true" alt="PokeAPI"> </p> <p align="center"> <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"> <img src="https://img.shields.io/website?url=https%3A%2F%2Fgraphql-pokeapi.vercel.app&cacheSeconds=86400" alt="Wesite Up"> <img src="https://github.com/mazipan/graphql-pokeapi/workflows/Build%20UI/badge.svg" alt="Actions"> </p>

Playground Screenshot

Homepage

https://graphql-pokeapi.vercel.app

Endpoint

Playground

https://graphql-pokeapi.vercel.app/api/graphql

Applications

If you are using graphql-pokeapi, you can add your apps in our awesome-list.md

Sending Request Example

Queries

QueryDescVariables
abilitiesGet list of abilities
abilityGet detail of abilityability
berriesGet list of berries
berryGet detail of berryberry
eggGroupsGet list of egg groups
eggGroupGet detail of egg groupeggGroup
encounterMethodsGet list of encounterMethods
encounterMethodGet detail of encounterMethodencounterMethod
evolutionChainsGet list of evolutionChains
evolutionChainGet detail of evolutionChainsid
evolutionTriggersGet list of evolutionTriggers
evolutionTriggerGet detail of evolutionTriggername
gendersGet list of genders
genderGet detail of gendergender
growthRatesGet list of growth rates
growthRateGet detail of growth rategrowthRate
locationsGet list of locations
locationGet detail of locationlocation
movesGet list of moves
moveGet detail of movemove
naturesGet list of natures
natureGet detail of naturenature
pokemonsGet list of pokemonslimit, offset
pokemonGet detail info of pokemonname
regionsGet list of regions
regionGet detail of regionregion
speciesGet list of species
typesGet list of types

Query Examples

pokemons

Desc: Get list of pokemons

<details> <summary>Sample Query</summary> <p>
query pokemons($limit: Int, $offset: Int) {
  pokemons(limit: $limit, offset: $offset) {
    count
    next
    previous
    status
    message
    results {
      url
      name
      image
    }
  }
}
</p> </details> <details> <summary>Sample Variables</summary> <p>
{
  "limit": 2,
  "offset": 1
}
</p> </details> <details> <summary>Sample Result</summary> <p>
{
  "data": {
    "pokemons": {
      "count": 964,
      "next": "https://pokeapi.co/api/v2/pokemon/?offset=3&limit=3",
      "previous": null,
      "results": [
        {
          "url": "https://pokeapi.co/api/v2/pokemon/1/",
          "name": "bulbasaur",
          "image": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/1.png"
        },
        {
          "url": "https://pokeapi.co/api/v2/pokemon/2/",
          "name": "ivysaur",
          "image": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/2.png"
        },
        {
          "url": "https://pokeapi.co/api/v2/pokemon/3/",
          "name": "venusaur",
          "image": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/3.png"
        }
      ],
      "status": true,
      "message": ""
    }
  }
}
</p> </details>

pokemon

Desc: Get detail info of pokemon

<details> <summary>Sample Query</summary> <p>
query pokemon($name: String!) {
  pokemon(name: $name) {
    id
    name
    abilities {
      ability {
        name
      }
    }
    moves {
      move {
        name
      }
    }
    types {
      type {
        name
      }
    }
    message
    status
  }
}
</p> </details> <details> <summary>Sample Variables</summary> <p>
{
  "name": "ditto"
}
</p> </details> <details> <summary>Sample Result</summary> <p>
{
  "data": {
    "pokemon": {
      "id": 132,
      "name": "ditto",
      "abilities": [
        {
          "ability": {
            "name": "imposter"
          }
        },
        {
          "ability": {
            "name": "limber"
          }
        }
      ],
      "moves": [
        {
          "move": {
            "name": "transform"
          }
        }
      ],
      "types": [
        {
          "type": {
            "name": "normal"
          }
        }
      ],
      "message": "",
      "status": true
    }
  }
}
</p> </details>

Credits

Contributors

Thanks goes to these wonderful people!

Contributors


Copyright © By Irfan Maulana