tsriram / react-github-user-search

Demo app using React & Apollo GraphQL client to search GitHub users via their GraphQL API. Built using TypeScript.

Home Page:https://github-user-search.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub User Search

This app uses GitHub's GraphQL API to search for users. There's a search box where user can input text and hit Enter (or click on Search button) to see search results. User can also paginate through the results.

Focus of this app is on delivering the search functionality and the UI design is kept to minimal using simple CSS.

Stack

This app was bootstrapped with Create React App and uses create-react-app-ts for TypeScript support.

It uses Apollo Client to work with GraphQL API.

Notes

  • To run the app, run yarn start (or npm run start). Make sure you've installed all dependencies by running yarn install or npm install.

  • This app requires a valid GitHub access token to be set as an environment variable. You can generate a new access token by following this article

    Once you have the token, set it as the value for the variable REACT_APP_GITHUB_TOKEN in .env file of the app. App now has Firebase authentication implemented and any GitHub user can login to access the app. TODO: Handle GitHub token expiry

  • To keep things simple, default page size is set to 5. This can be changed to a desired number in /src/constants.ts.

About

Demo app using React & Apollo GraphQL client to search GitHub users via their GraphQL API. Built using TypeScript.

https://github-user-search.netlify.com/


Languages

Language:TypeScript 84.9%Language:CSS 8.0%Language:HTML 7.0%