A GraphQL API for querying Pokémon data powered by PokeAPI.
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 runA Next.js frontend using Relay for GraphQL queries.
- Make sure the GraphQL server is running on port 5000 (otherwise adjust configurations manually).
- Install dependencies and start the dev server:
cd ui yarn yarn dev
The UI will be available at http://localhost:3000.
Open your browser and navigate to Nitro GraphQL IDE:
http://localhost:5000/graphql
See http/queries.http for executable examples.
query {
pokemons(skip: 0, take: 5) {
items {
id
name
detail {
baseExperience
height
weight
spriteUrl
abilities { name shortEffect }
}
}
}
}query {
pokemon(input: { id: 25 }) {
id
name
baseExperience
height
weight
abilities { name shortEffect }
moves { name power accuracy typeName }
}
}