Equality query indexes
Add @index to supported fields used by equality queries:
type PublicTransaction {
id: ID!
minedHeight: Int! @index
version: Int!
}
| Rule | Supported behavior |
|---|---|
| Scalars | Int, Boolean, BigInt, non-primary ID |
| Entity references | A single stored reference, indexed by its target ID; required on the inverse field of @derivedFrom |
| Nullability | Required or nullable |
| Declaration | One argument-free @index per field |
| Project limit | At most eight field indexes |
| Creation | Explicit migrate |
Primary id already has a lookup index. String fields, stored lists and derived lists are excluded from this profile. A reference index counts toward the same eight-index project limit.
Notes: Adding/removing an annotation changes model identity and requires a fresh namespace. Extra indexes consume storage and write work. See the full index contract for SQL behavior.
Chef 0.2.0 also supports range queries and ordered pagination on required Int! @index fields. The same index orders equal field values by ID; nullable fields and BigInt retain equality-only behavior.