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

Function getResult

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

Source from the content-addressed store, hash-verified

28}
29
30function getResult<TResult = MutationState>(
31 mutationCache: MutationCache,
32 options: MutationStateOptions<TResult>,
33): Array<TResult> {
34 return mutationCache
35 .findAll(options.filters)
36 .map(
37 (mutation): TResult =>
38 (options.select ? options.select(mutation) : mutation.state) as TResult,
39 )
40}
41
42export function useMutationState<TResult = MutationState>(
43 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…