type
Resolver
Resolver calculates a root Virtual field for the response. Read other values from its context and return Present(value), Empty[T](), or an error. The value must match the declared Virtual type and remains subject to field read access.
Full signature
type Resolver[T any] func(operation.ReadContext) (operation.Value[T], error)Related types
ReadContextReadContext supplies the current response view. References may be populated, so the callback's logical read type can differ from its write type. Ordinary read views may contain locale fallback values; Context has no fallback-source map. Final field redaction still applies after response transforms.
ValueValue carries an optional logical value. Its zero value is empty. For raw input, empty means omitted and Present(store.Null()) means explicit null. For typed scalars, empty is the portable empty state, not a durable absence encoding. T must follow its own ownership contract; this carrier does not deep-clone arbitrary mutable application values.