Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(code-gen): improve react-query DX by accepting a partial object …
…on `useQuery` hooks Accepts a partial object now on all `useQuery` hooks and related extensions. Validation of required arguments is already done via `queryOptions.enabled`. Also added runtime validation to catch issues when a custom `options.enabled` is used. The downside to this setup is that required arguments are not TS enforced. But that seems to be the most ergonomic setup, see for example https://tkdodo.eu/blog/react-query-and-type-script#type-safety-with-the-enabled-option
- Loading branch information
Showing
1 changed file
with
105 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters