Versioned.Absinthe.versioned_object

You're seeing just the macro versioned_object, go back to Versioned.Absinthe module for more information.
Link to this macro

versioned_object(name, list)

View Source (macro)

Declare an object, versioned compliment, and interface, based off name name.

The caller should use Absinthe.Schema.Notation as here we return code which invokes its object macro.

Both objects belong to an interface which encompasses the common fields. All common fields (except :id and :inserted_at) are included under an interface, named by the entity name and suffixed _base.

The generated object will have the following fields:

  • :id - ID of the record.
  • :version_id - ID of the most recent record's version.
  • :inserted_at - Timestamp when the record was created.
  • :updated_at - Timestamp when the record was last updated.
  • Additionally, all fields declared in the block.

The generated version object will have the following fields:

  • :id - ID of the version record.
  • :foo_id - If the entity was :foo, then this would be the id of the main record for which this version is based.
  • :is_deleted - Boolean indicating if the record was deleted as of this version.
  • :inserted_at - Timestamp when the version record was created.
  • Additionally, all fields declared in the block.