GitHub API V4 demo with React, TypeScript and urql
React + TypeScript app demo using the GitHub V4 GraphQL API.
.env
)You will need to generate a personal access token to connect to the GitHub GraphQL API.
To do this navigate to https://github.com/settings/tokens/new and select the following options:
Then run yarn bootstrap
and add your token to the API_AUTH_TOKEN
environment
variable in .env
.
To test the service worker and offline functionality you may want to use ngrok and use the HTTPS endpoint provided.
Script | Description | Environment |
---|---|---|
yarn bootstrap |
Set-up app config files | development , production |
yarn codegen |
Run graphql-codegen on API_ENDPOINT defined in .env |
development |
yarn bootstrap |
Production build | production |
yarn serve |
Serve local build | development |
yarn start |
Run development build | development |
yarn test |
Run tests | development , production |
yarn docker:bootstrap |
Run bootstrap using docker |
development |
yarn docker:build |
Run build using docker |
development |
yarn docker:start |
Run start using docker |
development |
yarn docker:test |
Run test using docker |
development |
RepositoryItem
and RepositoryDetail
components generic..
relative imports