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

Class Page

packages/angular-query/src/__tests__/inject-mutation.test.ts:517–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515 queryClient.setQueryData(key, 'tag-from-this-client')
516
517 @Component({
518 template: `<div>data: {{ mutation.data() ?? 'none' }}</div>`,
519 })
520 class Page {
521 readonly mutation = injectMutation(() => ({
522 mutationFn: (_text: string, context) =>
523 sleep(10).then(() => context.client.getQueryData(key)),
524 }))
525 }
526
527 const rendered = await render(Page)
528

Callers

nothing calls this directly

Calls 6

sleepFunction · 0.90
injectMutationFunction · 0.85
ComponentFunction · 0.50
getQueryDataMethod · 0.45
cancelQueriesMethod · 0.45
setQueryDataMethod · 0.45

Tested by

no test coverage detected