pub struct ChangelogConfig {
pub expose: bool,
pub schema: String,
pub read_role: Option<String>,
pub write_role: Option<String>,
pub max_limit: u32,
pub write_enabled: bool,
}Expand description
Configuration for exposing the observer entity-change log as queryable GraphQL types.
When expose = true, the compiler injects two read-only object types
(EntityChangeLog, TransportCheckpoint), a cursor-paginated list query, a
point-lookup query, and a checkpoint upsert mutation, all backed by the views the
changelog migration installs. Sidecar consumers can then poll the changelog over the
same GraphQL endpoint they use for everything else — same auth, audit, rate limiting.
The generated operations are gated by read_role / write_role (RBAC). The views
read from tb_entity_change_log / tb_transport_checkpoint, which the observer
system installs (or which the operator supplies as a documented prerequisite).
Fields§
§expose: boolMaster switch. When false, no changelog types are registered (default).
schema: StringPostgreSQL schema holding tb_entity_change_log and tb_transport_checkpoint.
Default "core" (the observer install convention).
read_role: Option<String>Role required to query the changelog (entity_change_logs, transport_checkpoint).
Matched against SecurityContext.roles. None disables the read gate (not
recommended for production). Default Some("changelog_reader").
write_role: Option<String>Role required to upsert checkpoints (upsert_transport_checkpoint).
Matched against SecurityContext.roles. None disables the write gate.
Default Some("changelog_writer").
max_limit: u32Maximum rows a single entity_change_logs page should return.
Enforced as a documented/runtime clamp rather than a GraphQL argument
constraint (the argument system has no max). Default 1000.
write_enabled: boolWhether the mutation executor writes the tb_entity_change_log outbox row
in-transaction (the Change-Spine transactional outbox). Default true.
Distinct from expose, which gates the read path (the
#149 GraphQL changelog types): write_enabled gates the write path. Set
false to disable the outbox write globally — e.g. for an application
that does not consume the Change Spine — so no mutation pays the write.
Overridable at runtime by FRAISEQL_CHANGELOG_ENABLED; composes (AND) with
the per-mutation
MutationDefinition.changelog flag.
Trait Implementations§
Source§impl Clone for ChangelogConfig
impl Clone for ChangelogConfig
Source§fn clone(&self) -> ChangelogConfig
fn clone(&self) -> ChangelogConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChangelogConfig
impl Debug for ChangelogConfig
Source§impl Default for ChangelogConfig
impl Default for ChangelogConfig
Source§impl<'de> Deserialize<'de> for ChangelogConfigwhere
ChangelogConfig: Default,
impl<'de> Deserialize<'de> for ChangelogConfigwhere
ChangelogConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ChangelogConfig
Source§impl PartialEq for ChangelogConfig
impl PartialEq for ChangelogConfig
Source§fn eq(&self, other: &ChangelogConfig) -> bool
fn eq(&self, other: &ChangelogConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ChangelogConfig
impl Serialize for ChangelogConfig
impl StructuralPartialEq for ChangelogConfig
Auto Trait Implementations§
impl Freeze for ChangelogConfig
impl RefUnwindSafe for ChangelogConfig
impl Send for ChangelogConfig
impl Sync for ChangelogConfig
impl Unpin for ChangelogConfig
impl UnsafeUnpin for ChangelogConfig
impl UnwindSafe for ChangelogConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.