A GraphQL wrapper for the World of Warcraft Game Data APIs and Profile APIs. Built with Apollo Server.
Some WoW endpoints still need to be implemented. See the Implementation Status
section for a list of the WoW endpoints and their status.
-
Install dependencies
npm install
-
Update environment variables
Rename
.env.example
to.env
and set the following variables:PORT=4000 REDIS_HOST="redis server ip" REDIS_PORT=6379 REDIS_PASSWORD="password" CLIENT_ID="blizzard battle.net client id" CLIENT_SECRET="blizzard battle.net client secret" OAUTH_SUCCESS_REDIRECT="successful login redirect url" OAUTH_FAILURE_REDIRECT="failed login redirect url"
- The port to run the server on
- The Redis server IP
- The port the Redis server runs on
- The Redis server password
- Your Client ID and Client Secret from your Blizzard Battle.net OAuth client
- The URL to redirect clients to on a successful login
- The URL to redirect clients to on a failed login
-
Start Redis in a Docker container
docker-compose up -d
-
Start the server
npm start
Apollo Server provides GraphQL Playground for you to test your GraphQL queries before implementing them in client code.
With your server running, go to http://localhost:4000/api in your browser to open GraphQL Playground. It includes:
- A text area for writing queries
- A play button to execute queries
- A text area for viewing query results
- Views for schema inspection and generated documentation
In addition to the documentation generated by GraphQL Playground, schema documentation is also available as browsable webpages via graphdoc.
Run the following command to generate the webpages, which can be hosted on a web server. A docs/
directory will be created in the root of the project.
npm run graphdoc
- Implement the rest of the WoW API endpoints
- Implement unit tests
- Allow for query params (namespace, region, locale, etc.)
The GraphQL implementation status of each WoW API endpoint is listed below.