type
ReadHooks
ReadHooks registers response transformations using the field's output type, which can differ from its write type when a relationship is populated.
Properties
| Property | Type | Description |
|---|---|---|
AfterRead | []OutputTransform[T] | AfterRead transforms each returned field value after resource AfterRead hooks and before final field redaction. It runs for reads and mutation responses, without changing the stored value. |
Full signature
type ReadHooks[T any] struct {
// AfterRead transforms each returned field value after resource AfterRead
// hooks and before final field redaction. It runs for reads and mutation
// responses, without changing the stored value.
AfterRead []OutputTransform[T]
}