Skip to main content

Equality query indexes

Add @index to supported fields used by equality queries:

type PublicTransaction {
id: ID!
minedHeight: Int! @index
version: Int!
}
RuleSupported behavior
ScalarsInt, Boolean, BigInt, non-primary ID
Entity referencesA single stored reference, indexed by its target ID; required on the inverse field of @derivedFrom
NullabilityRequired or nullable
DeclarationOne argument-free @index per field
Project limitAt most eight field indexes
CreationExplicit 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.