Skip to content

mbauerdev/pokemon-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PokemonApp

A GraphQL API for querying Pokémon data powered by PokeAPI.

Getting Started (Backend)

A .NET 10 Backend using Hot Chocolate GraphQL server.

Use your IDE of choice or this command to run the server:

cd src/Host
dotnet run

Getting Started (Frontend)

A Next.js frontend using Relay for GraphQL queries.

  1. Make sure the GraphQL server is running on port 5000 (otherwise adjust configurations manually).
  2. Install dependencies and start the dev server:
    cd ui
    yarn
    yarn dev

The UI will be available at http://localhost:3000.

GraphQL Playground

Open your browser and navigate to Nitro GraphQL IDE:

http://localhost:5000/graphql

Example Queries

See http/queries.http for executable examples.

List Pokémon

query {
  pokemons(skip: 0, take: 5) {
    items {
      id
      name
      detail {
        baseExperience
        height
        weight
        spriteUrl
        abilities { name shortEffect }
      }
    }
  }
}

Get Pokémon by ID

query {
  pokemon(input: { id: 25 }) {
    id
    name
    baseExperience
    height
    weight
    abilities { name shortEffect }
    moves { name power accuracy typeName }
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors