Skip to content

Conversation

markerikson
Copy link
Collaborator

@markerikson markerikson commented Aug 26, 2025

This PR:

  • Updates the RTKQ internals to rearrange the API instance setup in module.ts so that buildInitiate() is called before buildMiddleware(), and then makes getRunningQueryThunk available to buildMiddleware
  • Updates cacheCollection.ts to:
  • We already expose the abort signal into the retryCondition callback, via extraArgs.baseQueryApi.signal. Added a test to verify it gets marked as aborted if we have aborted the in-flight request.

Fixes #4942

Copy link

codesandbox bot commented Aug 26, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

codesandbox-ci bot commented Aug 26, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit dbb5e65:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

Copy link

github-actions bot commented Aug 26, 2025

size-limit report 📦

Path Size
1. entry point: @reduxjs/toolkit/query/react (modern.mjs) 15.1 KB (+0.32% 🔺)
1. entry point: @reduxjs/toolkit/query (cjs, production.min.cjs) 24.18 KB (+0.37% 🔺)
1. entry point: @reduxjs/toolkit/query/react (cjs, production.min.cjs) 26.42 KB (-0.22% 🔽)
2. entry point: @reduxjs/toolkit/query (without dependencies) (cjs, production.min.cjs) 10.82 KB (+0.47% 🔺)
3. createApi (.modern.mjs) 15.5 KB (+0.21% 🔺)
3. createApi (react) (.modern.mjs) 17.5 KB (+0.26% 🔺)

Copy link

netlify bot commented Aug 26, 2025

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit dbb5e65
🔍 Latest deploy log https://app.netlify.com/projects/redux-starter-kit-docs/deploys/68ae161f1182d10008f181d2
😎 Deploy Preview https://deploy-preview-5061--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@markerikson markerikson force-pushed the feature/4942-abort-retries branch from 8aee196 to fc597ba Compare August 26, 2025 20:14
@markerikson markerikson force-pushed the feature/4942-abort-retries branch from fc597ba to dbb5e65 Compare August 26, 2025 20:16
@markerikson markerikson merged commit 407688d into master Aug 30, 2025
114 checks passed
@aryaemami59 aryaemami59 deleted the feature/4942-abort-retries branch September 16, 2025 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Query retries occur after component with useQuery hook is unmounted

2 participants