-
Notifications
You must be signed in to change notification settings - Fork 72
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
Combine our RTK API's into one API instance for better cache re-fetching and tags #1386
Comments
The unified-fides-resources branch already does some of this, so let's work on this after that feature branch is merged in. |
@allisonking is this still needed? |
Yes! I've been picking at it as other features are built but there are still a good number of instances where we aren't doing this yet. This shouldn't be difficult to do though |
Leaving a note to myself that I ran into this reduxjs/redux-toolkit#2484, should be able to work around it though |
moving to done. |
Is your feature request related to a specific problem?
RTK recommends only having one call to
createApi
and then injecting more endpoints off of the one instance.Describe the solution you'd like
We should refactor our endpoints to this pattern so that it's easier to control cache invalidation across different endpoints. We have ~14 slice files that all create their own API instance.
Describe alternatives you've considered, if any
A description of any alternative solutions or features you've considered.
Additional context
I came across this because I wanted the
/plus/scan
endpoint to invalidate the existingdatamap
cache, but they would need to be the same API instance first.The text was updated successfully, but these errors were encountered: