* fix(mutationCache): export MutationCacheNotifyEvent type
Export MutationCacheNotifyEvent type to make it consistent with QueryCacheNotifyEvent (which is exported) and make it easier to write listener functions.
* fix(mutationCache): export MutationCacheNotifyEvent type
---------
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
* fix(query-core): fix context type error in `onSuccess`
* docs(query-core): update `useMutation` documentations
* fix(query-core): the `context` should not be inferred as `undefined` when `TContext` is defined
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
this allows key-ing of mutations without having to re-mount components using mutations; the mutationKey basically defines the identity of the mutation - it doesn't make much sense to keep data of a different mutationKey around at observer level if the key changes
Hello, I’m the maintainer of openapi-fetch, and use it primarily with TanStack Query. Though it’s a vanillaJS project, it works perfectly with TanStack Query and there are even dedicated docs to using the two together.
Happy to accept any change requests in the description, etc.
mutations were not gc'd correctly when being reset. GC was invoked on unsubscribe, but reset disconnects the observer from the mutation in the cache and must thus also trigger a GC, because the observer is no longer watching the values of that mutation, and another mutate() call will create a new mutation anyway. Thus, the old mutation becomes orphaned when reset is called.
This change dramatically improves the performance of the queries table. The issue was that each Query Row would update on every queryCache update. Now, each QueryRow only updates when its particular query is updated.
RELEASE_ALL
* fix: make sure there is only one package.json after build
* fix: angular release
we cannot publish out of the build directory because pnpm doesn't see it as a workspace, so it won't replace workspace dependencies. To fix this, we:
- make the publish script point to the root directory (config.js)
- make sure our top-level package.json has types and exports and that they point to ./build
- make sure to remove the build/package.json after the build script ran
* chore: use rimraf
* chore: specify files to limit what we include
* chore: fix relative workspace dependencies
* chore: fix ci.json
* fix: package.json path