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

Class Page

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

Source from the content-addressed store, hash-verified

638 queryClient.setQueryData(key, 'tag-from-this-client')
639
640 @Component({
641 template: `<div>data: {{ mutation.data() ?? 'none' }}</div>`,
642 })
643 class Page {
644 readonly mutation = injectMutation(() => ({
645 mutationFn: (_text: string, context) =>
646 sleep(10).then(() => context.client.getQueryData(key)),
647 }))
648 }
649
650 const rendered = await render(Page)
651

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