Installation
To start using OpenAPI Qraft, you'll need to install two packages:
- The CLI tool for generating the API client
- The Qraft Client React package for using the generated API client
- npm
- yarn
- pnpm
npm install -D @openapi-qraft/cli
npm install @openapi-qraft/react @openapi-qraft/tanstack-query-react-types
yarn add --dev @openapi-qraft/cli
yarn add @openapi-qraft/react @openapi-qraft/tanstack-query-react-types
pnpm add -D @openapi-qraft/cli
pnpm add @openapi-qraft/react @openapi-qraft/tanstack-query-react-types
IDE Support
Installing @openapi-qraft/tanstack-query-react-types
explicitly helps IntelliJ-based IDEs
(like WebStorm) provide better autocomplete and type inference. Without explicit installation,
these IDEs may have slower autocomplete and missing TSDoc hints due to how they handle
package resolution and type inference.
Peer Dependency
If you're not already using TanStack Query v5, you'll need to install it separately:
- npm
- yarn
- pnpm
npm install @tanstack/react-query
yarn add @tanstack/react-query
pnpm add @tanstack/react-query
Requirements ๐ดโ
OpenAPI Qraft is compatible with React v18+ and works with both ReactDOM and React Native. The browser support aligns with TanStack Query's requirements:
Chrome >= 91
Firefox >= 90
Edge >= 91
Safari >= 15
iOS >= 15
Opera >= 77