7nohe / openapi-react-query-codegen

OpenAPI React Query Codegen is a code generator for creating React Query (also known as TanStack Query) hooks based on your OpenAPI schema.
https://openapi-react-query-codegen.vercel.app
MIT License
308 stars 31 forks source link

feat: Add ensureQueryData support #150

Closed 7nohe closed 1 month ago

7nohe commented 2 months ago

123

I have added support for ensureQueryData. This is useful when using TanStack Router in combination with TanStack Query. A sample project is also provided.

github-actions[bot] commented 2 months ago

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 99.04% (🎯 95%) 2085 / 2105
🟢 Statements 99.04% (🎯 95%) 2085 / 2105
🟢 Functions 100% (🎯 95%) 41 / 41
🟢 Branches 94.05% (🎯 85%) 190 / 202
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/constants.mts 100% 100% 100% 100%
src/createExports.mts 100% 100% 100% 100%
src/createSource.mts 100% 100% 100% 100%
Generated in workflow #333
7nohe commented 2 months ago

npm publish

7nohe commented 1 month ago

I need to use this feature urgently for work, so I will merge and release it. Since the tests have passed and there are no changes to the existing exports, I believe there shouldn’t be any issues.