pub struct IntermediateSchema {Show 35 fields
pub version: String,
pub types: Vec<IntermediateType>,
pub enums: Vec<IntermediateEnum>,
pub input_types: Vec<IntermediateInputObject>,
pub interfaces: Vec<IntermediateInterface>,
pub unions: Vec<IntermediateUnion>,
pub queries: Vec<IntermediateQuery>,
pub mutations: Vec<IntermediateMutation>,
pub subscriptions: Vec<IntermediateSubscription>,
pub fragments: Option<Vec<IntermediateFragment>>,
pub directives: Option<Vec<IntermediateDirective>>,
pub fact_tables: Option<Vec<IntermediateFactTable>>,
pub aggregate_queries: Option<Vec<IntermediateAggregateQuery>>,
pub observers: Option<Vec<IntermediateObserver>>,
pub sources: Option<Vec<SourceDefinition>>,
pub functions: Option<Vec<FunctionDefinition>>,
pub functions_config: Option<IntermediateFunctionsConfig>,
pub custom_scalars: Option<Vec<IntermediateScalar>>,
pub security: Option<Value>,
pub auth: Option<Value>,
pub observers_config: Option<Value>,
pub federation_config: Option<Value>,
pub subscriptions_config: Option<SubscriptionsConfig>,
pub validation_config: Option<ValidationConfig>,
pub debug_config: Option<DebugConfig>,
pub mcp_config: Option<McpConfig>,
pub rest_config: Option<RestConfig>,
pub grpc_config: Option<GrpcConfig>,
pub query_defaults: Option<IntermediateQueryDefaults>,
pub inject_defaults: Option<IntermediateInjectDefaults>,
pub naming_convention: NamingConvention,
pub session_variables: Option<SessionVariablesConfig>,
pub locale: Option<LocaleConfig>,
pub hierarchies_config: Option<HierarchiesConfig>,
pub changelog_config: Option<ChangelogConfig>,
}Expand description
Intermediate schema - universal format from all language libraries
§deny_unknown_fields is the load-bearing attribute on this struct
Every field below carries #[serde(default)], because an SDK legitimately omits most of
them. Without deny_unknown_fields, that combination means any key the compiler does
not read binds to an empty default and the compile reports success. That is not a
hypothetical: it is the mechanism behind nine separate shipped defects.
#847— seven SDKs emittedinject_defaults; the compiler had never heard of the key. An operator configuring a project-wide tenant predicate got✓ Schema compiled successfullyand not one operation with a tenant filter.#848— four SDKs emittedis_input; the type compiled as an output type and the served schema violated GraphQL §3.10.#756— the merger wroteargs/required, this struct readarguments/nullable. Every TOML-declared operation argument disappeared.#806/#807—injectvsinject_params, and five spellings ofrequires_scope. Queries compiled with no tenant predicate; gated fields compiled as public.
In each case the author was explicit and the compiler was silent. Denying unknown fields converts every one of those into an error naming the offending key, and — the point of putting it here rather than patching each instance — it does the same for the tenth key, which has not been invented yet.
Consequence to accept deliberately: a key an SDK emits that this struct does not declare now fails the compile. That is the intended breaking change. A producer emitting a key no consumer reads was never doing anything; now it says so.
Fields§
§version: StringSchema format version
types: Vec<IntermediateType>GraphQL object types
enums: Vec<IntermediateEnum>GraphQL enum types
input_types: Vec<IntermediateInputObject>GraphQL input object types
interfaces: Vec<IntermediateInterface>GraphQL interface types (per GraphQL spec §3.7)
unions: Vec<IntermediateUnion>GraphQL union types (per GraphQL spec §3.10)
queries: Vec<IntermediateQuery>GraphQL queries
mutations: Vec<IntermediateMutation>GraphQL mutations
subscriptions: Vec<IntermediateSubscription>GraphQL subscriptions
fragments: Option<Vec<IntermediateFragment>>GraphQL fragments (reusable field selections)
directives: Option<Vec<IntermediateDirective>>GraphQL directive definitions (custom directives)
fact_tables: Option<Vec<IntermediateFactTable>>Analytics fact tables (optional)
aggregate_queries: Option<Vec<IntermediateAggregateQuery>>Analytics aggregate queries (optional)
observers: Option<Vec<IntermediateObserver>>Observer definitions (database change event listeners)
sources: Option<Vec<SourceDefinition>>Scheduled ingress source definitions (#573) — the dual of observers.
Reuses the compiled SourceDefinition
shape directly (it already carries serde defaults); the converter copies them
into the compiled schema.
functions: Option<Vec<FunctionDefinition>>Serverless function definitions (#1325) — the authoring dual of the compiled
functions section.
Reuses the runtime shape
(FunctionDefinition) directly, as
sources does, so an authored declaration and the one the server dispatches
are the same struct. The compiler pairs this list with the [functions] TOML
group (module_dir, dlq_store) to emit the compiled section; the two halves
have one owner each and neither may set the other’s keys.
Before #1325 nothing could write this section: IntermediateSchema had no
field for it, so the only way to ship a function was to hand-edit
schema.compiled.json — which the next fraiseql compile overwrote.
functions_config: Option<IntermediateFunctionsConfig>Functions settings from the [functions] TOML table (#1325).
Injected by the merger, never present in schema.json — the same
arrangement query_defaults has. The compiler pairs it with
functions to emit the compiled section: the definitions
are schema and these are deployment settings, one owner each
(docs/architecture/config-vs-settings.md).
custom_scalars: Option<Vec<IntermediateScalar>>Custom scalar type definitions
Defines custom GraphQL scalar types with validation rules.
Custom scalars can be defined in Python, TypeScript, Java, Go, and Rust SDKs,
and are compiled into the CompiledSchema’s CustomTypeRegistry.
security: Option<Value>Security configuration (from fraiseql.toml) Compiled from the security section of fraiseql.toml at compile time. Optional - if not provided, defaults are used.
auth: Option<Value>PKCE OAuth-client configuration (the [auth] PKCE group, #621).
The TOML merger emits the compiled auth object here (discovery_url,
client_id, client_secret_env, server_redirect_uri); the converter
carries it verbatim into CompiledSchema.auth. None when the group is
absent.
observers_config: Option<Value>Observers/event system configuration (from fraiseql.toml).
Contains backend connection settings (redis_url, nats_url, etc.) compiled
from the [observers] TOML section. Embedded verbatim into the compiled schema.
federation_config: Option<Value>Federation configuration.
Two authoring workflows feed this field:
- The TOML merger embeds the
[federation]section underfederation_config. - Language SDKs (e.g. the Python SDK’s
export_schema(federation=...)) emit the block under the top-levelfederationkey inschema.json; thealiasbinds it here so the legacy JSON workflow does not silently drop it.
Carried verbatim by the converter into CompiledSchema.federation.
subscriptions_config: Option<SubscriptionsConfig>WebSocket subscription configuration (hooks, limits).
Compiled from the [subscriptions] TOML section. Embedded verbatim into
the compiled schema for server-side consumption.
validation_config: Option<ValidationConfig>Query validation config (depth/complexity limits).
Compiled from [validation] in fraiseql.toml. Embedded into the compiled
schema for server-side consumption.
debug_config: Option<DebugConfig>Debug/development configuration.
Compiled from [debug] in fraiseql.toml. Embedded into the compiled
schema for server-side consumption.
mcp_config: Option<McpConfig>MCP (Model Context Protocol) server configuration.
Compiled from [mcp] in fraiseql.toml. Embedded into the compiled
schema for server-side consumption.
rest_config: Option<RestConfig>REST transport configuration.
Compiled from [rest] in fraiseql.toml. Embedded into the compiled
schema for server-side consumption.
grpc_config: Option<GrpcConfig>gRPC transport configuration.
Compiled from [grpc] in fraiseql.toml. Embedded verbatim into the compiled
schema, whose grpc_config gates the transport (#780).
query_defaults: Option<IntermediateQueryDefaults>Global auto-param defaults for list queries (injected from TOML by the merger).
Never present in schema.json — populated at compile time from [query_defaults]
in fraiseql.toml. Used by the converter to resolve per-query auto_params.
inject_defaults: Option<IntermediateInjectDefaults>Project-wide default injected parameters, from [inject_defaults].
Emitted as a top-level key by seven SDKs’ ConfigLoaders and consumed by the
converter. See IntermediateInjectDefaults for the precedence rules and for why
the merge happens after [fraiseql.tenancy] validation rather than before it
(#847).
naming_convention: NamingConventionNaming convention for GraphQL operation names.
Compiled from fraiseql.toml top-level naming_convention setting.
session_variables: Option<SessionVariablesConfig>Session variable injection configuration.
When populated, the executor calls set_config() before each query and
mutation to inject per-request values (JWT claims, HTTP headers, or literals)
as PostgreSQL transaction-scoped settings.
Embedded verbatim from the session_variables key in schema.json.
locale: Option<LocaleConfig>The request locale ([locale], #1512), carried from fraiseql.toml. Validated by the
same LocaleConfig::validate the server runs at load.
hierarchies_config: Option<HierarchiesConfig>Hierarchy definitions for ID-based ltree operators.
Compiled from the [hierarchies] TOML section. Maps hierarchy names
to table/path_column pairs for subquery generation.
changelog_config: Option<ChangelogConfig>Changelog GraphQL-exposure configuration.
Compiled from the [changelog] TOML section by the merger. Drives the
converter’s injection of the EntityChangeLog / TransportCheckpoint
types and their operations.
Trait Implementations§
Source§impl Clone for IntermediateSchema
impl Clone for IntermediateSchema
Source§impl Debug for IntermediateSchema
impl Debug for IntermediateSchema
Source§impl Default for IntermediateSchema
impl Default for IntermediateSchema
Source§impl<'de> Deserialize<'de> for IntermediateSchema
impl<'de> Deserialize<'de> for IntermediateSchema
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>,
Source§impl PartialEq for IntermediateSchema
impl PartialEq for IntermediateSchema
Source§impl Serialize for IntermediateSchema
impl Serialize for IntermediateSchema
impl StructuralPartialEq for IntermediateSchema
Auto Trait Implementations§
impl Freeze for IntermediateSchema
impl RefUnwindSafe for IntermediateSchema
impl Send for IntermediateSchema
impl Sync for IntermediateSchema
impl Unpin for IntermediateSchema
impl UnsafeUnpin for IntermediateSchema
impl UnwindSafe for IntermediateSchema
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<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Send for Twhere
T: ?Sized,
impl<T> Sync for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.