MCPcopy
hub / github.com/TanStack/query / sendDevToolsEvent

Function sendDevToolsEvent

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

Source from the content-addressed store, hash-verified

2596const DEV_TOOLS_EVENT = '@tanstack/query-devtools-event'
2597
2598const sendDevToolsEvent = ({
2599 type,
2600 queryHash,
2601 metadata,
2602}: {
2603 type: DevToolsActionType
2604 queryHash?: string
2605 metadata?: Record<string, unknown>
2606}) => {
2607 const event = new CustomEvent(DEV_TOOLS_EVENT, {
2608 detail: { type, queryHash, metadata },
2609 bubbles: true,
2610 cancelable: true,
2611 })
2612 window.dispatchEvent(event)
2613}
2614
2615const stylesFactory = (
2616 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…