Example React app with Apollo/GraphQL created for a presentation at the meetup React & GraphQL Sundsvall.
You can find the API used in this app in the repo esatto/graphql-movie-api.
DEMO - Coming soon
- React.js - UI
- Create React App - Create React apps with no build configuration
- Apollo Client - GraphQL client, fetch/update data via GraphQL
- TypeScript - Static types
- Apollo CLI - Used for generating types for GraphQL queries and mutations
We're using yarn
in these examples, but npm
should work as well.
- Run
yarn
to install packages - Run
yarn start
to start the app in development mode. - Run
yarn graphql
to generate TypeScript definitions for all queries when added/updated.
For syntax highlighting and autocomplete, use the Apollo VSCode plugin.
The project is configured with the apollo.config.js. You need to run the API locally for this to work.
This project was partially coded during a live code session, and is not completely made for production use.
Components in the common directory is mostly styled components that weren't necessary for the live coding.
This project was bootstrapped with Create React App.
This example project is MIT licensed.