MCPcopy Create free account
hub / github.com/TanStack/query / getResult

Function getResult

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

Source from the content-addressed store, hash-verified

31}
32
33function getResult<
34 TResult = MutationState,
35 TMutation extends Mutation<any, any, any, any> =
36 MutationTypeFromResult<TResult>,
37>(
38 mutationCache: MutationCache,
39 options: MutationStateOptions<TResult, TMutation>,
40): Array<TResult> {
41 return mutationCache
42 .findAll(options.filters)
43 .map(
44 (mutation): TResult =>
45 (options.select
46 ? options.select(mutation as TMutation)
47 : mutation.state) as TResult,
48 )
49}
50
51export function useMutationState<
52 TResult = MutationState,

Callers 1

useMutationStateFunction · 0.70

Calls 1

findAllMethod · 0.45

Tested by

no test coverage detected