Bump @reduxjs/toolkit from 2.2.7 to 2.2.8
Bumps @reduxjs/toolkit from 2.2.7 to 2.2.8.
Release notes
Sourced from @reduxjs/toolkit
's releases.
v2.2.8
This bugfix release fixes a long-standing issue with RTK Query lazy query triggers returning stale data in some cases, fixes an error handling issue in RTK Query, and exports additional TS types.
Changelog
Lazy Query Trigger Handling
We'd had a couple long-standing issues reporting that
const result = await someLazyQueryTrigger()
sometimes returned stale data, especially if a mutation had just invalidated that query's tag.We finally got a good repro of this issue and identified it as a mis-written call inside of the middleware that skipped past the necessary handling to activate the correct query status tracking in that scenario. This should now be fixed.
Other Changes
Timeout handling in RTKQ endpoints should now correctly throw a timeout-related error instead of an
AbortError
.Base queries now have access to the current
queryCacheKey
value so it can be used in deciding query logic.We've exported several more TS types related to query options, as some users have been depending on those even though they previously weren't part of the public API.
What's Changed
- Export
QueryExtraOptions
andMutationExtraOptions
by@aryaemami59
in reduxjs/redux-toolkit#4556- Fix
mangleErrors
not preserving different error types by@aryaemami59
in reduxjs/redux-toolkit#4586- Add the
TypedUseQueryStateOptions
helper type by@aryaemami59
in reduxjs/redux-toolkit#4604- feat(baseQuery): expose queryCacheKey in baseQuery by
@HaakonSvane
in reduxjs/redux-toolkit#4636- Fix
AbortError
being triggered incorrectly oncreateApi
endpoint timeout by@andrejpavlovic
in reduxjs/redux-toolkit#4628- type: export QueryReturnValue by
@hornta
in reduxjs/redux-toolkit#4640- call
initiate
to refetch queries from middleware by@phryneas
in reduxjs/redux-toolkit#4651Full Changelog: https://github.com/reduxjs/redux-toolkit/compare/v2.2.7...v2.2.8
Commits
-
e7540a5
Release 2.2.8 -
2885f69
Merge pull request #4651 from reduxjs/pr/fix-4650 -
4788d51
Add test for lazy query trigger fix -
a59476e
callinitiate
to refetch queries from middleware -
8178e7f
Merge pull request #4640 from hornta/export-query-return-value -
eb11019
Merge pull request #4628 from andrejpavlovic/fix/timeout-on-createApi-endpoin... -
f009cc9
Merge pull request #4636 from HaakonSvane/add-queryCacheKey-to-baseQuery-api -
c8f3739
Merge pull request #4604 from aryaemami59/export-UseQueryStateOptions -
551ad03
type: export QueryReturnValue -
e569971
Add example forTypedUseQueryStateOptions
- Additional commits viewable in compare view
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
-
$dependabot recreate
will recreate this MR rewriting all the manual changes and resolving conflicts