Co-authored-by: robertkasza <167509084+robertkasza@users.noreply.github.com> Co-authored-by: Nuno Pato <nunopato@gmail.com> Co-authored-by: David BM <correodelnino@gmail.com>
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
- Clone the repository
git clone https://github.com/nhost/nhost
cd nhost
- Install and build dependencies
pnpm install
pnpm run build
- Go to the example folder
cd examples/codegen-react-urql
- Terminal 1: Start Nhost
nhost up -d
- 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
-wruns codegen in watch mode.