src/mutationCache.ts

query · packages/query-core/src/mutationCache.ts · typescript · MIT
analytics

A robust, event-driven cache manager for tracking and coordinating asynchronous mutation states within a global query client architecture.

// Source: https://github.com/TanStack/query | License: MIT | Copyright 2021-present Tanner Linsley
// Provided via justclaw.it.com; keep this notice with the code.
import { notifyManager } from './notifyManager'
import { Mutation } from './mutation'
import { matchMutation, noop } from './utils'
import { Subscribable } from './subscribable'
import type { MutationObserver } from './mutationObserver'
import type {
  DefaultError,
  MutationFunctionContext,
  MutationOptions,
  NotifyEvent,
} from './types'
import type { QueryClient } from './queryClient'
import type { Action, MutationState } from './mutation'
import type { MutationFilters } from './utils'

// TYPES

/**
 * Global callbacks that fire for every mutation handled by a `MutationCache`, regardless of which
 * component or observer

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key