Skip to main content

Documentation Index

Fetch the complete documentation index at: https://archie.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

A UUID field stores a 128-bit Universally Unique Identifier — a standardized string in the form 123e4567-e89b-12d3-a456-426614174000. UUIDs are guaranteed to be unique across systems, databases, and servers without any central coordination, which makes them the right choice for identifiers that travel outside your database.

When to use UUIDs

  • Public-facing identifiers in URLs/orders/123e4567-... reveals nothing about the order’s age or volume the way /orders/47 would.
  • Distributed identifiers — IDs generated on the client or in another system that need to be unique when merged.
  • Tokens — invite tokens, share links, password reset tokens.
  • External references — IDs that must be unique across multiple workspaces or environments.
If you just need an integer primary key for a single table, the auto-generated id column is enough. Reach for UUID when the ID needs to be globally unique or hard to guess.

Configuration options

OptionDescription
NameThe system identifier used in the GraphQL and REST APIs (for example transaction_id, invite_token).
DescriptionAn optional internal note explaining the field’s purpose.
Default ValueAn optional specific UUID string. Usually left blank — UUIDs are typically generated by the application or API at creation time.
MandatoryIf on, the record cannot be saved without a valid UUID.
UUID field type configuration

How it appears in the API

The field is generated as a UUID scalar (or String in stacks that don’t have a dedicated UUID scalar) in GraphQL, and as a string in JSON. Validation of the UUID format runs on insert and update. See the GraphQL API Explorer to inspect the generated mutations.

Permissions

UUID fields obey the per-role read and write rules configured in Role-Based Access.

FAQ

Use a Relationship field. It enforces referential integrity, generates the inverse query in GraphQL, and visually links the two tables. UUID is for free-form identifiers that aren’t tied to a specific Archie table.
Either works. Server-side generation is the default — leave Default Value blank and let the API assign the UUID on insert. Client-side generation is useful when you need to know the ID before the record is saved (for offline-first apps or correlation across systems).
UUIDs are 16 bytes vs. 4 bytes for a standard integer ID, so indexes are slightly larger. The trade-off is rarely meaningful at typical scales, and it’s almost always worth it for IDs you expose externally.
UUIDs are designed to be unique by construction — collisions are statistically negligible. If you need a strict database-level constraint, use the auto-generated primary key on the table or add a unique index.