Skip to content

grdnmsz/gatsby-source-pokeapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-source-pokeapi

A gatsby source plugin to fetch Pokemon data through the famous https://pokeapi.co/ API.

Installation

npm install gatsby-source-pokeapi

How to use

In your gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-pokeapi`,
      options: {
        nbOfPokemons: 251,
      },
    },
  ],
}

How to query

query {
  allPokemon {
    nodes {
      stats {
        hp
        attack
        defense
        special_attack
        special_defense
        speed
      }
      types
      remoteImage {
        absolutePath
      }
    }
  }
}

License

This project is under the MIT license.

About

Gatsby source plugin to fetch data from pokeapi.co

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published