Skip to content

Conversation

markerikson
Copy link
Collaborator

This PR:

  • Fixes the logic in executeEndpoint to only run a provided transformResponse callback when the endpoint's query method is used, not when there's an upsertQueryData call or a queryFn field.

This fixes a regression introduced in #4738 as part of the thunk restructuring to enable infinite queries.

Fixes #4940

Copy link

codesandbox bot commented Aug 2, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

codesandbox-ci bot commented Aug 2, 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 d075d6c:

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

@markerikson markerikson force-pushed the bugfix/4940-transformresponse branch from 5353807 to d075d6c Compare August 2, 2025 18:38
Copy link

github-actions bot commented Aug 2, 2025

size-limit report 📦

Path Size
1. entry point: @reduxjs/toolkit/query/react (modern.mjs) 15.05 KB (+0.04% 🔺)
1. entry point: @reduxjs/toolkit/query (cjs, production.min.cjs) 24.08 KB (+0.17% 🔺)
1. entry point: @reduxjs/toolkit/query/react (cjs, production.min.cjs) 26.44 KB (+0.08% 🔺)
2. entry point: @reduxjs/toolkit/query (without dependencies) (cjs, production.min.cjs) 10.77 KB (+0.1% 🔺)
3. createApi (.modern.mjs) 15.46 KB (+0.01% 🔺)
3. createApi (react) (.modern.mjs) 17.46 KB (+0.04% 🔺)

Copy link

netlify bot commented Aug 2, 2025

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

Name Link
🔨 Latest commit 5353807
🔍 Latest deploy log https://app.netlify.com/projects/redux-starter-kit-docs/deploys/688e5a76a34cc200088abee1
😎 Deploy Preview https://deploy-preview-5049--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.

Copy link

netlify bot commented Aug 2, 2025

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

Name Link
🔨 Latest commit d075d6c
🔍 Latest deploy log https://app.netlify.com/projects/redux-starter-kit-docs/deploys/688e5b2aa3d70d0008ec2f97
😎 Deploy Preview https://deploy-preview-5049--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 merged commit d8190e3 into master Aug 2, 2025
163 of 164 checks passed
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.

[RTK Query] api.util.upsertQueryData not work correctly when has transformResponse
1 participant