Skip to main content
Version: 2.2.0

Timestamps

Timestamps are output-only fields that ivo populates automatically. Enable them with the timestamps schema option.

Default behavior​

With timestamps: true, ivo adds createdAt and updatedAt: createdAt is set on create, updatedAt is null on create and set on every update.

Loading playground…

Custom keys​

Use an object to rename the fields. updatedAt can also be made non-nullable, so it's set on create too.

Loading playground…

Without updatedAt​

Set updatedAt to false to keep only createdAt.

Loading playground…

Rules​

  • Timestamps are ignored if provided as input.
  • createdAt is set once, during creation.
  • updatedAt is null on create (set on create too when it's non-nullable) and refreshed on every successful update.
  • Setting updatedAt to false disables the update timestamp while keeping createdAt.