type

AccessRule

AccessRule decides whether one field value may be created, read, or updated. Return false during a write to reject the operation, or during a read to omit the field from the response. Returning an error stops the operation. Field rules cannot return the query predicates supported by collection access rules.

Full signature

Related types

  • Context

    Context describes one field callback at its current lifecycle phase. Root, Siblings and Prior are detached, immutable snapshots of field values; document metadata such as ID is available separately on Context. A callback changes its own value only through its return value.