Skip to content

OpenAPI React Query Codegen is a code generator for creating React Query (also known as TanStack Query) hooks based on your OpenAPI schema.

License

Notifications You must be signed in to change notification settings

7nohe/openapi-react-query-codegen

Repository files navigation

OpenAPI React Query Codegen

Code generator for creating React Query (also known as TanStack Query) hooks based on your OpenAPI schema.

npm version

Features

  • Generates custom react hooks that use React Query's useQuery, useSuspenseQuery, useMutation and useInfiniteQuery hooks
  • Generates custom functions that use React Query's ensureQueryData and prefetchQuery functions
  • Generates query keys and functions for query caching
  • Generates pure TypeScript clients generated by @hey-api/openapi-ts