Skip to content
🤷

Forgive us! These docs are a work in progress. Some pages may be incomplete or describe features that aren't quite finished yet. Farkitect is in early development and we don't recommend using it for real work just yet. Feel free to explore — just be aware that things are still being built.

Relationship Constraints Reference

Constraints restrict which element types a relationship type can connect. They are defined as a list of valid pairs — each specifying a source element type and a target element type.

"constraints": {
"validPairs": [
{ "source": "application-component", "target": "application-service" },
{ "source": "application-component", "target": "application-component" }
]
}

Each pair references element types by their $id.

  • When drawing a relationship on the Canvas, only valid source/target pairs are allowed
  • The relationship type picker only shows types that have a valid pair for the selected source and target
  • Invalid attempts are silently prevented — no relationship is created

A relationship type’s constraints are edited as a grid in the Constraints section of its Properties: rows are sources, columns are targets. Changes to the grid are held until you click Save; Discard puts it back. See How to create a relationship type.

A relationship type with no constraints (empty validPairs or omitted constraints) can connect any two elements. This is useful for general-purpose relationships like Association.

"constraints": {}

Some built-in relationship types use "*" as a wildcard for one end:

{ "source": "note", "target": "*" }

This means the source must be a Note, but the target can be any element type.

The integrity checker can detect M1 relationships that violate their M2 type’s constraints. This can happen when:

  • An M2 constraint is added or tightened after M1 relationships were already created
  • A .farki file is imported with relationships that don’t match the available M2 constraints

Violations are reported as warnings — existing relationships are not automatically deleted.

Farkitect

Model anything.

“Welcome back — your diagrams have been plotting without you.”


Release 282 · 14 Oct 2026

New video: Exploring the Explorer, a four-minute tour of the Explorer panel

Release
282
Released
14 Oct 2026, 00:03 UTC
Built
14 Oct 2026, 00:03 UTC
Environment
Production
Surface
Docs
Commit
a9ad7d2
Branch
main