Github GraphQL API
A react application that uses Axios as GraphQL client to fetch data from Github GraphQL API. Resository list can be received by searching by the Github username.
Features
- Search repositories by Github username.
- Sorting method, currently descending order (default).
- Filter to exclude forked repositories.
- Add result limit and pagination.
Installation and setup
-
Install dependencies by running
npm install
or
npm i
in the terminal inside project root directory.
-
Create a
.env
file in the project root directory and add Github access token inside. Something likeREACT_APP_GITHUB_ACCESS_TOKEN=youraccesstoken
, don't forget to addREAC_APP_
part at the beginning of the veriable. Otherwise, you'll face problem receiving that veriable throughprocess.env
. You should include.env
to your .gitignore file. -
Run application by:
npm start
This will launch the application on a new browser window at http://localhost:3000