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

Function sendDevToolsEvent

packages/query-devtools/src/Devtools.tsx:2828–2843  ·  view source on GitHub ↗
({
  type,
  queryHash,
  metadata,
}: {
  type: DevToolsActionType
  queryHash?: string
  metadata?: Record<string, unknown>
})

Source from the content-addressed store, hash-verified

2826const DEV_TOOLS_EVENT = '@tanstack/query-devtools-event'
2827
2828const sendDevToolsEvent = ({
2829 type,
2830 queryHash,
2831 metadata,
2832}: {
2833 type: DevToolsActionType
2834 queryHash?: string
2835 metadata?: Record<string, unknown>
2836}) => {
2837 const event = new CustomEvent(DEV_TOOLS_EVENT, {
2838 detail: { type, queryHash, metadata },
2839 bubbles: true,
2840 cancelable: true,
2841 })
2842 window.dispatchEvent(event)
2843}
2844
2845const stylesFactory = (
2846 theme: 'light' | 'dark',

Callers 5

ContentViewFunction · 0.85
handleRefetchFunction · 0.85
triggerErrorFunction · 0.85
QueryDetailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected