Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react-query): better error in development mode to identify bad u…
…seQuery calls (#6288) * refactor(query-core): export isPlainObject * refactor(useBaseQuery): dev error in case of bad argument Mainly for project without TS. This helps tracking bad signature when migrating from v4 to v5. * refactor(useQueryClient): dev error in case of bad queryClient Mainly for project without TS. Make sure the queryClient passed as parameter is really a query. With the change of signature introduced by v5, queryOptions from useQuery could end up as queryClient due to how useBaseQuery works. * revert: "refactor(useQueryClient): dev error in case of bad queryClient" This reverts commit 9bedf21. * refactor(useQuery): manual test to avoid export from query-core. * refactor(useQuery test): TS ignore invalid call --------- Co-authored-by: Guillaume Labat <[email protected]> Co-authored-by: Dominik Dorfmeister <[email protected]>
- Loading branch information