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

Function sendDevToolsEvent

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

Source from the content-addressed store, hash-verified

2700const DEV_TOOLS_EVENT = '@tanstack/query-devtools-event'
2701
2702const sendDevToolsEvent = ({
2703 type,
2704 queryHash,
2705 metadata,
2706}: {
2707 type: DevToolsActionType
2708 queryHash?: string
2709 metadata?: Record<string, unknown>
2710}) => {
2711 const event = new CustomEvent(DEV_TOOLS_EVENT, {
2712 detail: { type, queryHash, metadata },
2713 bubbles: true,
2714 cancelable: true,
2715 })
2716 window.dispatchEvent(event)
2717}
2718
2719const stylesFactory = (
2720 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