Skip to content

Pokemon API

Rhett Lowe edited this page May 18, 2020 · 2 revisions

Make a GraphQL API for working with Pokemon.

Please include the following:

  1. Start with this base Query and Objects
type Query {
  findPokemon(id: ID!): Pokemon
  findPokemonID(name: String!): Pokemon

}
type Pokemon {
  number: ID!
  name: String!
  type1: String!
  type2: String
  total: Int
  hp: Int
  attack: Int
  defense: Int
  spAttack: Int
  spDefense: Int
  speed: Int
}
type Evolution {
  id: ID!
  from: Pokemon!
  to: Pokemon!
  level: Int
  condition: String
  type: String!
}
type MoveType {
  attack: String!
  defense: String!
  effectiveness: String!
  multiplier: Int
}
type Move {
  name: String!
  type: String
  category: String
  power: Int
  accuracy: Int
  pp: Int
  tm: String
  effect: String
  probability_perc: Int
}
  1. Add queries to get a list of random pokemon, check move effectiveness (by entering the two types involved), get list of evolutions for a pokemon

Clone this wiki locally