Skip to content

Sample repo for my Boston React Conf 2018 talk on React & GraphQL

Notifications You must be signed in to change notification settings

christoomey/boston-react-conf-2018-graphql-talk

Repository files navigation

React + GraphQL Sample App

You can view the recording from Boston React Conf 2018 where I presented the talk associated with this repo:

boston react conf talk video

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 use of 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.

Typescript

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.

Setup

Dependencies

This project uses yarn to manage dependencies.

yarn install

GitHub Token

You'll need to to generate a GitHub personal access token with repo and read:org scopes. Once generated, add it to a .env file:

GITHUB_TOKEN=abcdef-secret-token

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:

yarn start

About

Sample repo for my Boston React Conf 2018 talk on React & GraphQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published