A simple example of fetching from remote source and GraphQL API implementation _
- Python 3.6
- Virtualenv
- FastAPI
- Scarlette
- Graphene
- Uvicorn
Clone project to your environment, then dive into project folder
pip3 install -r requirements.txt
uvicorn main:app --reload
Visit http://127.0.0.1:8000 to GraphiQL Dashboard
In dashboard press CTRL + SPACE
to see all possible fields.
Press CTRL + ENTER
to make query.
Pokemons
{
pokemons(asc: true, first: 2) {
name
id
number
maxCP
maxHP
image
types
attacks {
fast {
name
damage
}
special {
name
damage
}
}
evolutions {
id
number
name
maxCP
maxHP
image
types
}
}
}
Pokemon
{
pokemon(name: "Pikachu") {
name
id
number
maxCP
maxHP
image
types
}
}