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

split enhanceEndpoints into addTagTypes and enhanceEndpoint #2730

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Sep 25, 2022

This would deprecate enhanceEndpoints and add new methods addTagTypes and enhanceEndpoint.

These are easier to type from our side and would allow the argument and return type of existing endpoints to be changed.

@phryneas phryneas marked this pull request as draft September 25, 2022 17:59
@phryneas
Copy link
Member Author

Unfortunately adding a function that can change existing types pretty much ruins all internal types :/

@bogdan0083
Copy link

This looks awesome, thanks! ❤️ I will test it when I have a spare time.

@bogdan0083
Copy link

@phryneas I'm sorry that it took me so long, had a pretty rough month.

I've been trying to install the PR version in my project from the pr/split_enhanceEndpoints branch but it doesn't work for some reason. I've been able to install the package from branch using the GitPkg service:

"@reduxjs/toolkit": "https://gitpkg.now.sh/reduxjs/redux-toolkit/packages/toolkit?pr/split_enhanceEndpoints",

But it behaves buggy, for example after mutation it leaves the query in constant isLoading state. Reverting to the latest @reduxjs/redux-toolkit fixes the problem (but it doesn't have enchanceEndpoint api, obviously).

Is there a way to easily install redux-toolkit package from pr/split_enhanceEndpoints branch?

P.S. I also tried to install with defined commit id, but it failed. Probably because redux-toolkit repo has workspaces.

@phryneas
Copy link
Member Author

phryneas commented Nov 3, 2022

Huh, for some reason there doesn't seem a CodeSandbox build for this one.

@bogdan0083 I'm sorry about this, but this change has a lot of consequences for the internals, so we can't get that into the upcoming 1.9 release and I have stashed it for the moment being. I'll hopefully be able to come around it once 1.9 is out the door and everything has settled down. Until then it probably doesn't make sense testing it.

But please, give me a ping to remind me of this a few weeks after the 1.9 release :)

@bogdan0083
Copy link

bogdan0083 commented Nov 3, 2022

Sure! No worries, I’ll ping you after a while 🙂

Base automatically changed from v1.9-integration to master November 4, 2022 14:06
@bogdan0083
Copy link

@phryneas Hey there! Pinging to remind you of this feature :)

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.

2 participants