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.
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.
-
To run the app, run
yarn start
(ornpm run start
). Make sure you've installed all dependencies by runningyarn install
ornpm 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 articleOnce you have the token, set it as the value for the variableApp now has Firebase authentication implemented and any GitHub user can login to access the app. TODO: Handle GitHub token expiryREACT_APP_GITHUB_TOKEN
in.env
file of the app. -
To keep things simple, default page size is set to
5
. This can be changed to a desired number in/src/constants.ts
.