Files
nhost/examples/codegen-react-apollo
2023-01-16 10:00:28 +01:00
..
2022-12-25 15:21:52 +01:00
2022-06-29 10:15:12 +02:00
2022-12-25 15:21:52 +01:00
2023-01-12 10:14:41 +00:00
2022-12-25 15:21:52 +01:00
2022-12-25 15:21:52 +01:00
2022-12-25 15:21:52 +01:00
2022-12-25 15:21:52 +01:00
2022-12-25 21:40:13 +01:00
2022-12-25 15:21:52 +01:00
2022-06-29 10:15:12 +02:00
2022-12-25 15:21:52 +01:00

GraphQL Code Generator Example with React and Apollo Client

Todo app to show how to use:

This repo is a reference repo for the blog post: How to use GraphQL Code Generator with React and Apollo.

Get Started

  1. Clone the repository
git clone https://github.com/nhost/nhost
cd nhost
  1. Install and build dependencies
pnpm install
pnpm run build
  1. Go to the example folder
cd examples/codegen-react-urql
  1. Terminal 1: Start Nhost
nhost up -d
  1. Terminal 2: Start the React application
pnpm run dev

GraphQL Code Generators

To re-run the GraphQL Code Generators, run the following:

pnpm codegen -w

-w runs codegen in watch mode.