* Fix issues with queryOptions factory method types
* Apply the same fixes to infiniteQueryOptions
* Revert change to failing test
* Fix test in more userland way
* Unused import
* Add tRPC-style solution
* Unused import
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* fix(query-core): respect initialData for queryClient.ensureQueryData
we used to call `getQueryData` before queryCache.build(), but building is what creates the query and potentially adds initialData. I tried to make that more obvious by reading directly from `query.state.data`
* refactor: simplify condition
* chore: examples to react19
* test: seems like pre-warming adds another render, which is fine
* test: more pre-warming renders (this is fine)
* test: use react-render-stream
* chore: move tests to renderStream
* chore: fix act
* test: fix remaining tests
* test: move away from fireEvent.click
because it uses `act` under the hood, which isn't supported / wanted with renderStreams
* test: useInfiniteQuery to renderStream
* chore: stabilize test
* Add test with failing types
* Tidy up
* Move tests to correct file
* Add initial fixes (some review and testing needed)
* Formatting
* Ensure T params are mandatory for new overloads
* Fix type issues
* Unnecessary DataTag
* Add typeless tests
* Fix some cases
* Fixing more cases
* Fix some typings
* Fix remaining issues
* Fix linting errors
* Fix one warning
* Revert unnecessary change to getQueryDefaults
* Remove mutation defaults todo
* Rename var
* Remove all additional overloads in favour of a single definition which supports all cases
* Change type tests to more idomatic api
* Include TError on DataTag so that getQueryState can infer the error type correctly
* ci: apply automated fixes
* Add type case to QueryFilters tests
* Remove redudant comment
* TInferredError
* Fix Default TError in query filters
* Move to UnsetMarker and add type changes to a few missed datatag usages
* Fixed wasting Dominik's time
* Force build
* Undo
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix: handle optional and non-null chaining in exhaustive-deps
Fixed a false positive in the exhaustive-deps rule when using optional chaining and non-null assertions in query keys and functions.
* ci: apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Add types for QueryFilters which flow down to Query<> and QueryKey/DataTag types
* ci: apply automated fixes
* Add a type test
* ci: apply automated fixes
* Fix linting
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>