MCPcopy Index your code
hub / github.com/TanStack/query / getResult

Function getResult

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

Source from the content-addressed store, hash-verified

16}
17
18function getResult<TResult = MutationState>(
19 mutationCache: MutationCache,
20 options: MutationStateOptions<TResult>,
21): Array<TResult> {
22 return mutationCache
23 .findAll(options.filters)
24 .map(
25 (mutation): TResult =>
26 (options.select ? options.select(mutation) : mutation.state) as TResult,
27 )
28}
29
30export function useMutationState<TResult = MutationState>(
31 options: Accessor<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…