The Relay application is designed to be used in conjunction with the Relay documentation to demonstrate the APIs, concepts, and principles of Relay and their use in building Relay applications.
To get started with this project, follow these steps:
- Clone the repository to your local machine
- Install the dependencies by running
npm install
- Start the app by running
npm run dev
The application will now be running at localhost:3000
. This application also has GraphiQL setup so that you can run test queries against the schema. Navigate to localhost:3000/playground
to try it out.
This project uses the following structure:
src/
: contains the source code for the appsrc/components/
: contains the React components for the appsrc/index.tsx
: the entry point for the appwebpack.config.js
: the configuration file for Webpacktsconfig.json
: the configuration file for TypeScript.prettierrc.json
: the configuration file for Prettier.eslintrc.json
: the configuration file for ESLint
This project uses Prettier and ESLint to enforce a consistent code style. Prettier is a code formatter that automatically formats your code according to a set of rules. ESLint is a linting tool that identifies and reports on patterns found in your code.
To run TypeScript, Prettier, and ESLint, run the following command:
npm run ts
npm run lint
npm run prettier
These commands lint and format your code, and print any linting errors or warnings to the console.