Skip to main content
Version: v9.0.0

OptimisticOperationRollbackArgs

Argument of .rollback() .​

data

  • the target's data as it is now, after other mutations and server responses

previous

  • the target's data just before this operation was applied, for looking up old values

reason

  • why the change is reverted: "error" , "abort" or "removed" (from the queue)

response / request

  • the mutation's failed response (absent for "removed" ) and the mutation request

Import
import { OptimisticOperationRollbackArgs } from "@hyper-fetch/core"

Preview​

type OptimisticOperationRollbackArgs<Data,Mutation> = OptimisticRollbackArgs<Mutation> & { data: Data; previous: Data };

Structure​

OptimisticOperationRollbackArgs
NameTypeDescription
data
Data
previous
Data