gatsby-source-pokeapi

0.1.0 • Public • Published

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 {
      name
      stats {
        attack
        defense
        special_attack
        hp
        special_defense
        speed
      }
      types
    }
  }
}

License

This project is under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i gatsby-source-pokeapi

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

3.86 kB

Total Files

7

Last publish

Collaborators

  • gordonmes