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 {
name
stats {
attack
defense
special_attack
hp
special_defense
speed
}
types
}
}
}
This project is under the MIT license.