Dex Docs

Getting started

Getting started

Setting up your own server

Let's start by cloning the GitHub repo and downloading it to your local machine.

  1. Navigate to https://github.com/jgarrow/graphql-server-pokeapi. Click on the green Code button in the upper righthand corner and copy the HTTPS url to your clipboard.

  2. Open your terminal and download the repo to your computer, pasting in that url from GitHub after clone:

git clone https://github.com/jgarrow/graphql-server-pokeapi
cd graphql-server-pokeapi
  1. You have a couple of options here. The repo from GitHub is a monorepo that contains both files for this documentation site (/docs) and the files for the actual server (/server).
  • If you don't want the documentation site files, you can delete the entire /docs folder located at the root of the repo. Move the contents of /server out into the root and delete the /server folder so that everything is at the root level. Then you can continue on to step 3.
  • If you want to keep the documentation site, navigate to the /server directory before moving on to step 3.
# if you're keeping the documentation site, navigate to the `/server` directory before install the dependencies
cd server
  1. Install the dependencies:
npm install
  1. Spin up your development server!
npm run start

**nodemon has been installed for hot reloading whenever changes are made and saved. This way, you don't have to kill and restart the server every time you save changes. To use this feature, use the following start command instead:

npm run server
  1. Navigate to http://localhost:4000/ and start querying!

Schema and docs

You can find documentation about the schema and query fields at Base queries and Nested query types.

You can also check out the "Schema" and "Docs" tabs in the GraphQL playground

GraphQL playground schema tab

Gif showing the schema tab in the GraphQL Playground

GraphQL playground docs tab

Gif showing the docs tab in the GraphQL PlaygroundEdit this page on GitHub