This application is a simple React and Vite starter with some added GraphQL goodness. It has @graphql-codegen/cli for doing codegen based on GraphQL inputs (Both schemas and operations). The following plugins are being utilized:
- @graphql-codegen/client-preset
- This is the recommended way to generate typesafe client code for React and Vue apps
- @graphql-codegen/introspection
- This is to give us a JSON file of the entire introspected schema from our remote GraphQL service
Once all the requirements are installed/setup:
- Install Dependencies
pnpm install --frozen-lockfile
- Run GraphQL Codegen CLI
pnpm run codegen
- Start the Vite dev server
pnpm run dev