Questions about recent changes
Looking at the commits in the last month or so, several breaking changes have occurred:
-
provideAngularQuery
is renamed to provideTanStackQuery
- injectQuery
and injectMutation
no longer supply the query client as the first parameter of optionsFn
- mutationOptions
is now a thing?!? I assumed it wasn't necessary (https://github.com/TanStack/query/discussions/6096#discussioncomment-7172042)
1. What else did I miss?
2. Is there anywhere that this is all documented besides being the weirdo who enjoys reading people's commits?
3. What are the reasons each of these changes took place?GitHub
Mutation version of
queryOptions()
. · TanStack query · Discussion...It would be nice to have a mutation version of queryOptions().
2 Replies
fascinating-indigo•10mo ago
Hey yeah it's experimental for a reason 🙂
-
provideAngularQuery
isn't removed yet and is clearly marked as deprecated so everybody can rename it before the stable release where I'll probably remove it.
- For the queryClient parameter see https://github.com/TanStack/query/pull/8307 where it's documented why and how to handle the breaking change. I am open to anyone submitting a PR that fixes typing and re-adds the parameter but I don't consider it essential for a non-experimental release and I removed it as it's broken and I wouldn't want more developers to start depending on it.
- mutationOptions
is there for your convenience but there are other ways to achieve the same, that didn't change.
A breaking change you might have missed is the removal of the component-based developer tools. The very easy to use provider withDevtools
which for most users is all they'll have to add and injectDevtoolsPanel
for less common embedded usage replaced that. The reason why is documented here: https://github.com/TanStack/query/pull/8284
So there are 2 hard breaking changes so far.
How and where would you like to have this documented?GitHub
fix(angular-query): remove queryClient parameter from callback func...
The queryClient being passed to callback functions of injectMutation and injectQuery is convenient as there's no need for the developer to then inject the queryClient themselves. However it...
GitHub
refactor(angular-query): build with tsup and remove devtools compon...
This changes the build process of the Angular adapter to use tsup. When not relying on a certain version of the Angular compiler, its mandatory TypeScript version, the Angular runtime or ng-packagr...
fascinating-indigo•10mo ago
BTW the underlying bug why I removed the queryClient parameter has been open for over two months but no-body fixed it and there's only so much work I can do on my own which for the most part has been my unpaid free time.
being the weirdo who enjoys reading people's commitsI don't think it's weird to keep an eye on a package's releases when using one that's clearly marked as pre-stable and potentially containing breaking changing in every version. Also IF something breaks after a version update it should be easy to find?