A gatsby source plugin to fetch Pokemon data through the famous https://pokeapi.co/ API.
npm install gatsby-source-pokeapi
In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: `gatsby-source-pokeapi`,
options: {
nbOfPokemons: 251,
},
},
],
}
query {
allPokemon {
nodes {
stats {
hp
attack
defense
special_attack
special_defense
speed
}
types
remoteImage {
absolutePath
}
}
}
}
This project is under the MIT license.