Skip to content

akornato/next-redux-saga-example

Repository files navigation

next-redux-saga-example CircleCI

Facebook GitHub repo viewer. The app has a sidebar navigation with repos sorted by stargazers. Clicking on one of them fetches that repo data and populates the main view with its details and a list of project contributors.

CI/CD

Musings

I tried to use the new GitHub GraphQL API but hit the following issues:

Hence I'm using GraphQL only to get the sidebar repo list to select only the few fields I need there. Since GitHub GraphQL API imposes a limit of 100 repos with a single query, I'm using a little redux saga to get them all via paging. The API also requires authentication so I'm proxying the API call via a Netlify function to avoid including GitHub API token in the web client build.

Built with

Requirements

Node.js

Dev

Create .env with your GITHUB_GRAPHQL_API_TOKEN and then:

  npm install
  npm run dev

This will start the app at http://localhost:4000/ and serve the lambda at http://localhost:9000/. The dev server uses http-proxy-middleware so the lambda is simply available at /.netlify/functions, same as in prod.

Test

  npm test

Build

  npm run build

Export

Exports the project into a static app:

  npm run export

License

MIT

About

Facebook GitHub repo viewer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published