query
query copied to clipboard
🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.
This commit builds on the changes introduced in [refactor/narrow-callback-types](https://github.com/TanStack/query/pull/9202) and replaces all instances of `Promise | T` with the new `MaybePromise` helper type. The `MaybePromise` type, originally defined in `@tanstack/query-persist-client-core/src/createPersister.ts`,...
### Describe the bug It seems like `injectInfiniteQuery` that depends on some signal-based param, like `query()` for the queryKey/queryFn, is not working as expected when we use the `.refetch()` directly...
If my memory serves me right, returning a Promise makes sure the data is updated before the mutation is entirely complete (i.e., `isPending` is true until onSuccess is fulfilled) This...
### Describe the bug Hello, I'm using query to fetch some data coming from the server using Vue, the code looks like this: ```ts const { error, data, status }...
### Describe the bug In vue query, after calling queryClient.clear all existing queries created with useQuery instance stop working. An example where this is problematic: I have a query fetching...
This PR adds new argument to `mutateFn` allowing for access to `queryClient` as well as `meta` object. This feature should make it easier to attach authentication headers from within `mutateFn`,...
`onMutate` never actually runs synchronously because the result of `#mutationCache.config.onMutate?.()` is always awaited beforehand Diff that fixes this: ```diff diff --git a/node_modules/@tanstack/query-core/build/modern/mutation.js b/node_modules/@tanstack/query-core/build/modern/mutation.js index 1bc7990..efbddd6 100644 --- a/node_modules/@tanstack/query-core/build/modern/mutation.js +++ b/node_modules/@tanstack/query-core/build/modern/mutation.js...
This PR introduces `isFunctionVariant()` and `resolveValueOrFunction()` utilities to replace repetitive `typeof === 'function'` checks throughout the codebase, consolidating the common "value or function that computes value" pattern. ## Problem and...
Issue #8781: fix(query-core): add check to #combineResult for input parameter length to decide whether to return optimistic(old) or updated results
## Description This fixes an `effect_orphan` error that occurs, when `createQuery` gets called in an event listener, or simply outside of component initialization. I simply added `$effect.root` around the `$effects`...