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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
//! The ROOT QUERY: `<Root>Query`, the fold of the query units its members emit.
//!
//! ```ignore
//! #[derive(MergedObject, Default)]
//! #[graphql(name = "Query")]
//! pub struct MediaQuery(
//! <<media::Reel as Transformer>::Graphql as Graphql>::Query,
//! <<media::Take as Transformer>::Graphql as Graphql>::Query,
//! <media::Screened as Graphql>::Query,
//! );
//! ```
//!
//! # The join rides the TYPE SYSTEM, and that is the whole mechanism
//!
//! A root holds a field's type PATH and nothing else; what that type's own declaration emitted is
//! written in tokens this derive will never see. So the fold names no unit: it PROJECTS, twice —
//! through `Transformer`'s wire-face member and through that member's own trait — and the compiler
//! resolves the meeting. A member that declared no wire face is `E0277` AT THE PROJECTION, carrying
//! `Graphql`'s own sentence (*declares no wire face — there is no `graphql(…)` block*); a member with
//! a face and no root fields binds `()` there, which is not an object and says so at the fold.
//!
//! # A RETRIEVING MEMBER takes the INTERFACE's road, and that closes the root query-surface gap
//!
//! `#[ingraph(fuse)] shots: Shots` and `#[ingraph(search)] travel: TravelSearch` both name a
//! declaration that implements [`Graphql`] DIRECTLY — a retrieving declaration is not a launchable
//! node and implements no `Transformer`, which is the fourth-tier fact the `fuse` word already rests
//! on. So they join through the same one-hop projection an interface takes.
//!
//! Until this arm existed the fold read TWO lists and a retrieving member wrote the mount word to no
//! effect: an index minted `<Decl>Queries`, bound it at `Graphql::Query`, put it on its own roster —
//! and no emitted root could reach it. Every schema in this workspace mounted such a unit AS the
//! root instead, which is what hid the gap.
//!
//! # An INTERFACE is projected ONCE, and the missing hop is forced rather than chosen
//!
//! A node's unit is reached through `Transformer` first, because a node's wire face is a member of
//! its entity binding. An interface has no entity binding to hold one: `Transformer: Identifiable`,
//! and `Identifiable::id_ref` hands back a `&Self::Id` — an interface's id is a SUM over its members'
//! ids, and a member's VALUE holds no such sum to lend a reference to. So `Transformer` is
//! unimplementable for an interface, which is the B-27 ruling's *an interface-owned id is
//! unspellable* met where it bites.
//!
//! What is left is `Graphql` itself, which the interface's own expansion implements, and the seat is
//! the SAME seat — `Graphql::Query`, folded by the same `MergedObject`. So this is one projection
//! shorter and not a second mounting mechanism: the citizenship a node has is the citizenship an
//! interface has, and only the road to the seat differs.
//!
//! That is the same door `Declared` opened for the launch, one tier over: nobody parses anybody's
//! declaration, and the agreement between two derives is a compile error rather than a convention.
//!
//! # MEMBERSHIP comes from the DECLARATION, because a macro cannot see an impl
//!
//! Only the fields wearing `#[ingraph(query)]` are projected. The alternative — project every node —
//! refuses every graph holding an operator, an index or a journal, none of which has a wire face,
//! and there is no third road: a macro cannot ask whether a type implements anything.
//!
//! The ZERO-FIELD MEMBER question the fold would otherwise raise is therefore moot by construction,
//! and that is what the filter buys rather than a happy accident: a member with no fields would
//! contribute an empty `MetaType::Object` to the merge, and an object with no fields is not a
//! GraphQL type. Nothing can reach the fold without a unit, and a unit always has the single.
//!
//! A ROOT WITH NO MARKED FIELD EMITS NOTHING AT ALL. Presence is the same mechanism one level up: a
//! graph that serves no schema has no root query, rather than one holding nothing.
//!
//! # The SDL name is `Query`, where the Rust name is the root's
//!
//! One schema has one root, so the published name is GraphQL's own convention and carries no
//! deployment's word. The RUST name is per root — two graphs in one crate are two types — and it is
//! the one thing an application spells: `Schema::build(MediaQuery::default(), …)`.
//!
//! # No doc attribute, and that is the emitted faces' rule reaching the root
//!
//! `#[derive(MergedObject)]` calls `get_rustdoc` on the STRUCT, so a doc comment here would publish
//! generated prose as the root type's SDL description. The wire faces avoid the same thing by
//! carrying no doc; this carries none for the same reason, and an `allow` in its place so a
//! declaring crate under `missing_docs` is not warned about a type it did not write.
use ;
use GraphModel;