This is a basic structure for building clients to connect to GraphQL servers. It provides a starting point for developers to build their own GraphQL clients using popular libraries like Apollo and React.
- Uses Apollo Client to interact with GraphQL servers
- Includes React Hooks for making GraphQL requests in React components
- Uses GraphQL Code Generator to generate TypeScript types for GraphQL operations
- Provides a basic folder structure for organizing files
-
Clone the repository:
git clone git@github.com:innovixx/graphql-client-boilerplate.git
-
Install the dependencies:
pnpm install
-
Start the development server:
pnpm dev
-
Generate TypeScript types for GraphQL operations:
pnpm codegen
-
Build for production:
pnpm build
- Updating ESLint to version >= 10 causes incompatibility issues with eslint-react-plugin used under-the-hood by @innovixx/eslint-config. Version locked to the latest stable and compatible version.