Skip to content
module@warp-drive/core/types/cache/operations

Type Alias Operation ​

ts
type Operation = 
  | MergeOperation
  | RemoveResourceOperation
  | RemoveDocumentOperation
  | AddResourceOperation
  | UpdateResourceOperation
  | UpdateResourceFieldOperation
  | AddToResourceRelationshipOperation
  | RemoveFromResourceRelationshipOperation
  | AddToDocumentOperation
  | RemoveFromDocumentOperation;

Defined in: warp-drive-packages/core/src/types/cache/operations.ts:266

Cache Operations perform updates to the Cache's "remote" (or clean) state to reflect external changes.

Usually operations represent the result of a WebSocket or ServerEvent message, though they can also be used to carefully patch the state of the cache with information known by the application or developer.

Operations are applied via Cache.patch.

See also:

Released under the MIT License.