1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! What one compile writes to `schema.compiled.json`.
//!
//! The file is not the serialization of a single type. It is the core
//! [`CompiledSchema`] plus the **platform-extension sections that sit beside it**:
//! keys the GraphQL engine knows nothing about, read by subsystems that are compiled
//! in optionally. `functions` is the first such section, and it cannot be a
//! `CompiledSchema` field for a structural reason — the crate that defines
//! [`FunctionDefinition`](fraiseql_functions::FunctionDefinition) already depends on
//! `fraiseql-core`, so the dependency cannot run back the other way.
//!
//! Before #1325 that distinction did not matter, because nothing could author a
//! `functions` section: `IntermediateSchema` had no field for it, and the only writer
//! of one in the whole tree was a test that hand-built the JSON. The section existed
//! on the reading side only — `fraiseql-server`'s `ExtendedCompiledSchema` parsed a
//! key the compiler could not emit.
//!
//! This type is the writing side of that pair, and [`CompiledArtifact::to_json_value`]
//! is the one routine that assembles the file — so the `_content_hash` covers every
//! section rather than only the ones that happen to be `CompiledSchema` fields.
use ;
use CompiledSchema;
use FunctionsConfig;
/// The compiled schema together with the platform sections written alongside it.