React + GraphQL Sample App
This sample app demonstrates how to integrate React app with a GraphQL API. The
app uses the Apollo framework along with its stellar React bindings to
interact with the GitHub GraphQL API. In addition, the focus was on the
pattern of collocating queries with components, specifically highlighting the
fragments within sub-components to allow each component to own its
data, while allowing the application to compose queries from the fragments and
efficiently interact with the GraphQL API.
The master branch contains the default JS based implementation of the application. In the typescript branch all components are converted to TypeScript, and via the magic of Apollo CLI, relevant types are generated for each component with data needs.
This project uses yarn to manage dependencies.
You'll need to to generate a GitHub personal access token with
scopes. Once generated, add it to a
Note - The app will be connected to live data and your account based on the token you provide. The only action built into the app is to Star & Unstar repositories, but just be super clear, those actions will be reflected on github.com.
Starting the App
The app can be started with: