Skip to content

Commit e967a0e

Browse files
committed
docs: update readme with graphql info/move section
1 parent 120717a commit e967a0e

File tree

1 file changed

+50
-28
lines changed

1 file changed

+50
-28
lines changed

README.md

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,7 @@
1818

1919
A RESTful API for Pokémon - [pokeapi.co](https://pokeapi.co)
2020

21-
## Join Us On Slack!
22-
23-
Have a question or just want to discuss new ideas and improvements? Hit us up on slack. Consider talking with us here before creating new issue.
24-
This way we can keep issues here a bit more organized and helpful in the long run. Be excellent to each other :smile:
25-
26-
[Sign up](https://pokeapi-slack-invite.herokuapp.com/) easily!
27-
28-
Once you've signed up visit [PokéAPI on Slack](https://pokeapi.slack.com)
29-
30-
## Official Wrappers
31-
32-
* Node server-side [PokeAPI/pokedex-promise-v2](https://github.com/PokeAPI/pokedex-promise-v2) | _Auto caching_
33-
* Browser client-side [PokeAPI/pokeapi-js-wrapper](https://github.com/PokeAPI/pokeapi-js-wrapper) | _Auto caching_
34-
* Java/Kotlin [PokeAPI/pokekotlin](https://github.com/PokeAPI/pokekotlin)
35-
* Python 3 [GregHilmes/pokebase](https://github.com/GregHilmes/pokebase) | _Auto caching_
36-
* Python 2/3 [PokeAPI/pokepy](https://github.com/PokeAPI/pokepy) | _Auto caching_
37-
* PHP [lmerotta/phpokeapi](https://github.com/lmerotta/phpokeapi) | _Auto caching, lazy loading_
38-
* Ruby [rdavid1099/poke-api-v2](https://github.com/rdavid1099/poke-api-v2)
39-
* .Net Standard [mtrdp642/PokeApiNet](https://github.com/mtrdp642/PokeApiNet) | _Auto caching_
40-
* Go [mtslzr/pokeapi-go](https://github.com/mtslzr/pokeapi-go) | _Auto caching_
41-
* Dart [prathanbomb/pokedart](https://github.com/prathanbomb/pokedart)
42-
* Rust [lunik1/pokerust](https://gitlab.com/lunik1/pokerust) | _Auto caching_
43-
* Spring Boot [dlfigueira/spring-pokeapi](https://github.com/dlfigueira/spring-pokeapi) | _Auto caching_
44-
* Swift [kinkofer/PokemonAPI](https://github.com/kinkofer/PokemonAPI)
21+
> Beta GraphQL support is rolling out! Check out the [GraphQL paragraph](#graphql) for more info.
4522
4623
## Setup [![pyVersion37](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/download/releases/3.7/)
4724

@@ -81,7 +58,7 @@ from data.v2.build import build_all
8158
build_all()
8259
```
8360

84-
Visit [localhost:8000/api/v2/](localhost:8000/api/v2/) to see the running API!
61+
Visit [localhost:80/api/v2/](localhost:80/api/v2/) to see the running API!
8562

8663
Each time the build script is run, it will iterate over each table in the database, wipe it, and rewrite each row using the data found in data/v2/csv.
8764

@@ -95,9 +72,9 @@ make wipe_db
9572

9673
## Docker and Compose
9774

98-
There is also a multi-container setup, managed by [Docker Compose](https://docs.docker.com/compose/). This setup allow you to deploy a production-like environment, with separate containers for each services.
75+
There is also a multi-container setup, managed by [Docker Compose](https://docs.docker.com/compose/). This setup allows you to deploy a production-like environment, with separate containers for each services and is recommended if you need to simply spin up PokeAPI.
9976

100-
Start everything by simply
77+
Start everything by
10178

10279
```sh
10380
make docker-setup
@@ -113,14 +90,59 @@ docker-compose exec -T app sh -c 'echo "from data.v2.build import build_all; bui
11390
11491
Browse [localhost/api/v2/](http://localhost/api/v2/) or [localhost/api/v2/pokemon/bulbasaur/](http://localhost/api/v2/pokemon/bulbasaur/) on port `80`.
11592
93+
## GraphQL
94+
95+
<a href="ttps://github.com/hasura/graphql-engine">
96+
<img width="100px" src="https://graphql-engine-cdn.hasura.io/img/powered_by_hasura_blue.svg" />
97+
</a>
98+
99+
When you start PokeAPI with the above docker-compose setup, an [Hasura Engine](https://github.com/hasura/graphql-engine) server is started as well. It's possible to track all the PokeAPI tables and foreign keys by simply
100+
101+
```sh
102+
# hasura cli needs to be installed and available in your $PATH: https://hasura.io/docs/latest/graphql/core/hasura-cli/install-hasura-cli.html
103+
# hasura cli's version has to be v2.0.0-alpha.5
104+
make hasura-apply
105+
```
106+
107+
When finished browse http://localhost:8080 and you will find the admin console. The GraphQL endpoint will be hosted at http://localhost:8080/v1/graphql.
108+
109+
A free public GraphiQL console is browsable at the address https://beta.pokeapi.co/graphql/console/. The relative GraphQL endpoint is accessible at https://beta.pokeapi.co/graphql/v1beta
110+
111+
A set of examples are provided in the directory [/graphql/examples](./graphql/examples) of this repository.
112+
113+
## Official REST Wrappers
114+
115+
* Node server-side [PokeAPI/pokedex-promise-v2](https://github.com/PokeAPI/pokedex-promise-v2) | _Auto caching_
116+
* Browser client-side [PokeAPI/pokeapi-js-wrapper](https://github.com/PokeAPI/pokeapi-js-wrapper) | _Auto caching_
117+
* Java/Kotlin [PokeAPI/pokekotlin](https://github.com/PokeAPI/pokekotlin)
118+
* Python 3 [GregHilmes/pokebase](https://github.com/GregHilmes/pokebase) | _Auto caching_
119+
* Python 2/3 [PokeAPI/pokepy](https://github.com/PokeAPI/pokepy) | _Auto caching_
120+
* PHP [lmerotta/phpokeapi](https://github.com/lmerotta/phpokeapi) | _Auto caching, lazy loading_
121+
* Ruby [rdavid1099/poke-api-v2](https://github.com/rdavid1099/poke-api-v2)
122+
* .Net Standard [mtrdp642/PokeApiNet](https://github.com/mtrdp642/PokeApiNet) | _Auto caching_
123+
* Go [mtslzr/pokeapi-go](https://github.com/mtslzr/pokeapi-go) | _Auto caching_
124+
* Dart [prathanbomb/pokedart](https://github.com/prathanbomb/pokedart)
125+
* Rust [lunik1/pokerust](https://gitlab.com/lunik1/pokerust) | _Auto caching_
126+
* Spring Boot [dlfigueira/spring-pokeapi](https://github.com/dlfigueira/spring-pokeapi) | _Auto caching_
127+
* Swift [kinkofer/PokemonAPI](https://github.com/kinkofer/PokemonAPI)
128+
116129
## Donations
117130

118-
Help to keep PokéAPI running! If you're using PokéAPI as a teaching resource or for a project, consider sending us a $10 donation to help keep the service up. We get almost 20 million requests a month!
131+
Help to keep PokéAPI running! If you're using PokéAPI as a teaching resource or for a project, consider sending us a $10 donation to help keep the service up. We get 60 million requests a month!
119132
120133
Thank you to all our backers! [Become a backer](https://opencollective.com/pokeapi#backer)
121134
122135
<a href="https://opencollective.com/pokeapi#backers" target="_blank"><img src="https://opencollective.com/pokeapi/backers.svg?width=890"></a>
123136
137+
## Join Us On Slack!
138+
139+
Have a question or just want to discuss new ideas and improvements? Hit us up on slack. Consider talking with us here before creating new issue.
140+
This way we can keep issues here a bit more organized and helpful in the long run. Be excellent to each other :smile:
141+
142+
[Sign up](https://pokeapi-slack-invite.herokuapp.com/) easily!
143+
144+
Once you've signed up visit [PokéAPI on Slack](https://pokeapi.slack.com)
145+
124146
## Contributing
125147

126148
This project exists thanks to all the people who [contribute](https://github.com/PokeAPI/pokeapi/blob/master/CONTRIBUTING.md)

0 commit comments

Comments
 (0)