pub struct RestConfig {Show 19 fields
pub enabled: bool,
pub path: String,
pub max_page_size: u64,
pub default_page_size: u64,
pub default_embed_page_size: u64,
pub ndjson_batch_size: u64,
pub max_bulk_affected: u64,
pub max_filter_bytes: u64,
pub delete_response: DeleteResponse,
pub default_cache_ttl: u64,
pub cdn_max_age: Option<u64>,
pub require_auth: bool,
pub sse_heartbeat_seconds: u64,
pub sse_max_replay_events: u64,
pub max_embedding_depth: u32,
pub include: Vec<String>,
pub exclude: Vec<String>,
pub etag: bool,
pub idempotency_ttl_seconds: u64,
}Expand description
REST transport configuration (compiled from [rest] in fraiseql.toml).
Fields§
§enabled: boolWhether the REST transport is enabled.
path: StringBase path for REST endpoints (e.g., "/rest/v1").
max_page_size: u64Maximum rows per page (clamps ?limit= and ?first=).
default_page_size: u64Default page size when no ?limit= is specified.
default_embed_page_size: u64The page each parent row gets of an embedded relationship when the request names
none (?select=orders(id) without ?orders.limit=).
Distinct from max_page_size, which is the ceiling a client
may ask up to, and applied at most at that ceiling. An embedded level is charged
its page for every parent row, so defaulting it to the ceiling charged an unpaged
embed as if every parent had a full page of related rows.
ndjson_batch_size: u64Batch size for NDJSON streaming responses.
max_bulk_affected: u64Maximum affected rows for bulk PATCH/DELETE.
max_filter_bytes: u64Maximum byte length for ?filter= JSON values.
delete_response: DeleteResponseHow DELETE endpoints report success.
default_cache_ttl: u64Default result cache TTL in seconds (0 = no caching): the max-age of a GET’s
Cache-Control. An authenticated read (any credential) is private; only an
anonymous read is public, and only a public one carries s-maxage.
cdn_max_age: Option<u64>CDN s-maxage value in seconds for Cache-Control headers (None = omit).
require_auth: boolWhether REST endpoints require authentication by default.
sse_heartbeat_seconds: u64SSE heartbeat interval in seconds.
sse_max_replay_events: u64How many delivered events a Last-Event-ID resume may reach back over
(#1310).
A reconnecting client names the last event it received, and the stream replays
everything delivered since. A resume point far behind the head is therefore a
read proportional to how far behind it is, on the busiest table in the
deployment — so a request that would reach back further than this is refused
(413 RESUME_TOO_FAR_BEHIND) before a single frame is emitted, rather than
served in part. The client can then reconnect without the header and knowingly
start from now.
Counted across every entity type, because that is what the walk through the dispatch ledger costs, whatever share of it one resource turns out to be.
0 means no bound — every resume is served however far back it reaches.
That is the permissive setting, and worth naming as such: on a stream reachable
without a credential it hands an anonymous client an unbounded read.
max_embedding_depth: u32Maximum depth for resource embedding (?select=posts(comments)).
include: Vec<String>Whitelist of type names to expose as REST resources (empty = all).
exclude: Vec<String>Blacklist of type names to exclude from REST resources.
etag: boolWhether to enable ETag / If-None-Match conditional response support.
idempotency_ttl_seconds: u64TTL in seconds for idempotency key deduplication.
Trait Implementations§
Source§impl Clone for RestConfig
impl Clone for RestConfig
Source§impl Debug for RestConfig
impl Debug for RestConfig
Source§impl Default for RestConfig
impl Default for RestConfig
Source§impl<'de> Deserialize<'de> for RestConfigwhere
RestConfig: Default,
impl<'de> Deserialize<'de> for RestConfigwhere
RestConfig: 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 RestConfig
Source§impl PartialEq for RestConfig
impl PartialEq for RestConfig
Source§impl Serialize for RestConfig
impl Serialize for RestConfig
impl StructuralPartialEq for RestConfig
Auto Trait Implementations§
impl Freeze for RestConfig
impl RefUnwindSafe for RestConfig
impl Send for RestConfig
impl Sync for RestConfig
impl Unpin for RestConfig
impl UnsafeUnpin for RestConfig
impl UnwindSafe for RestConfig
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.