/react-graphql-axios-client

ReactJS, Axios, GraphQL client to fetch data from Github GraphQL API.

Primary LanguageJavaScript

Nodejs React Axios GraphQL client

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

  1. Clone repository

  2. Installing NodeJS with NVM

  3. Install dependencies by running

    npm install

    or

    npm i

    in the terminal inside project root directory.

  4. Setting up Github token.

  5. Create a .env file in the project root directory and add Github access token inside. Something like REACT_APP_GITHUB_ACCESS_TOKEN=youraccesstoken, don't forget to add REAC_APP_ part at the beginning of the veriable. Otherwise, you'll face problem receiving that veriable through process.env. You should include .env to your .gitignore file.

  6. Run application by:

    npm start

    This will launch the application on a new browser window at http://localhost:3000