Repository navigation
feat: expose mutation variables - #4814
Merged
Merged
Conversation
to get smaller bundlesize
because with our new browserslist, we'll always have an AbortController
returning the object and inlining the call yields "cannot redefine signal" ...
fix focusManager tests by not accessing private methods
remove a test that tests an impossible case
as the test said, there is no way to trigger #notify without listeners, so we can remove the whole test + code that relates to it
as the tests says, it's unused, so we can remove it completely
we can add the same observer twice and check that the observerAdded event has only been fired once
fix onlineManager tests by not accessing private methods
they have not been accessed outside of query
it was always set to true - there is no way to _not_ notify the cache
a simple truthy check suffices, as we can only pass an Array or undefined in here
because we also use it for mutationKeys
signal is now always defined
re-wrote some tests and removed some others that weren't easily testable without relying on internals
- remove undocumented variables option in MutationOptions and pass variables via `execute` method instead - reset mutation variables to allow for ui-based optimistic updates - get rid of notifyOptions by just forwarding the whole action - the options were a wrapper that turned action with a discriminated union into two booleans, which doesn't make much sense as you can only ever be in one of the states
add reset tests
# Conflicts: # docs/react/guides/migrating-to-v5.md # packages/query-core/src/query.ts # packages/query-core/src/queryCache.ts # packages/query-core/src/tests/mutations.test.tsx # packages/query-core/src/tests/queriesObserver.test.tsx # packages/query-core/src/tests/queryCache.test.tsx
# Conflicts: # packages/react-query/src/__tests__/useInfiniteQuery.test.tsx # packages/vue-query/src/mutationCache.ts
# Conflicts: # packages/query-core/src/mutationObserver.ts # packages/react-query/src/__tests__/suspense.test.tsx
# Conflicts: # packages/query-core/src/mutation.ts
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
# Conflicts: # packages/query-core/src/mutation.ts
instead of useMutationVariables, which can be implemented with useMutationState
# Conflicts: # packages/query-core/src/mutation.ts # packages/query-core/src/utils.ts
it needs to be `'pending'` everywhere
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.