Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(baseQuery): expose queryCacheKey in baseQuery #4636

Merged

Conversation

HaakonSvane
Copy link
Contributor

@HaakonSvane HaakonSvane commented Sep 20, 2024

  • Add queryCacheKey to BaseQueryApi typings
  • Expose query cache key to the baseQuery api context
  • Write tests to ensure correct typings and for ensuring matching keys between thunk dispatches and baseQuery

closes #4615

Copy link

codesandbox bot commented Sep 20, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

codesandbox-ci bot commented Sep 20, 2024

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 8b510b4:

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

@HaakonSvane
Copy link
Contributor Author

HaakonSvane commented Sep 20, 2024

Seems someone has exposed the forced field in the api previously. I'd ideally want to ensure this and the added queryCacheKey to be typed with a discriminated union on the endpoint type, but changing that would be a breaking change, so I added this field in a similar fashion instead

Copy link

netlify bot commented Sep 20, 2024

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

Name Link
🔨 Latest commit 8b510b4
🔍 Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/66ed3072f981f20008db3a3a
😎 Deploy Preview https://deploy-preview-4636--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 site configuration.

@HaakonSvane HaakonSvane changed the title feat(baseQuery): expose queryCacheKey in in baseQuery feat(baseQuery): expose queryCacheKey in baseQuery Sep 23, 2024
@EskiMojo14 EskiMojo14 merged commit f009cc9 into reduxjs:master Sep 24, 2024
43 checks passed
@EskiMojo14
Copy link
Collaborator

EskiMojo14 commented Sep 24, 2024

thanks! will aim to get a release out soon - there's a few other small PRs that would be good to get in at the same time :)

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.

Expose queryCacheKey in api baseQuery
3 participants