Entity
    Preparing search index...

    Type Alias EntityTriggerOrValidatorMutationInfo<TFields, TIDField, TViewerContext, TEntity, TSelectedFields>

    EntityTriggerOrValidatorMutationInfo:
        | { type: CREATE }
        | {
            cascadingDeleteCause: EntityCascadingDeletionInfo | null;
            previousValue: TEntity;
            type: UPDATE;
        }
        | {
            cascadingDeleteCause: EntityCascadingDeletionInfo
            | null;
            type: DELETE;
        }

    Information about the mutation that invoked a trigger or validator.

    Type Parameters

    Type Declaration

    • { type: CREATE }
      • type: CREATE

        The type of mutation that invoked this trigger or validator.

    • {
          cascadingDeleteCause: EntityCascadingDeletionInfo | null;
          previousValue: TEntity;
          type: UPDATE;
      }
      • cascadingDeleteCause: EntityCascadingDeletionInfo | null

        If this update is part of a cascading deletion (cascade set null), this field will contain information about the cascade that caused this update. Otherwise, it will be null.

      • previousValue: TEntity

        The previous value of the entity before the update.

      • type: UPDATE

        The type of mutation that invoked this trigger or validator.

    • { cascadingDeleteCause: EntityCascadingDeletionInfo | null; type: DELETE }
      • cascadingDeleteCause: EntityCascadingDeletionInfo | null

        If this delete is part of a cascading deletion, this field will contain information about the cascade that caused this cascading delete.

      • type: DELETE

        The type of mutation that invoked this trigger or validator.