MCPcopy
hub / github.com/TanStack/query / getResult

Function getResult

packages/vue-query/src/useMutationState.ts:56–66  ·  view source on GitHub ↗
(
  mutationCache: MutationCache,
  options: MutationStateOptions<TResult>,
)

Source from the content-addressed store, hash-verified

54}
55
56function getResult<TResult = MutationState>(
57 mutationCache: MutationCache,
58 options: MutationStateOptions<TResult>,
59): Array<TResult> {
60 return mutationCache
61 .findAll(options.filters)
62 .map(
63 (mutation): TResult =>
64 (options.select ? options.select(mutation) : mutation.state) as TResult,
65 )
66}
67
68export function useMutationState<TResult = MutationState>(
69 options: MutationStateOptions<TResult> = {},

Callers 1

useMutationStateFunction · 0.70

Calls 1

findAllMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…