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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
//! The WIRE BINDING: the emitted OUTPUT OBJECT and its ADDRESS as a client reads them, and the two
//! INPUT objects a client writes — the `<E>OrderBy` the ruled `orderBy: [<T>OrderBy!]` argument is a
//! list of (`@oneOf`, one column per term), and the `<E>Filter` the `where` argument takes (an
//! ordinary input object, any number of columns at once).
//!
//! [`graphql`](super::graphql) writes the SHAPES; this file writes what makes one a schema. The
//! split is not tidiness — it is what the era rule left behind. That file emits structures and an
//! enum and binds them to no library, and its note says the external names are carried on the model
//! for exactly this round to spend. This is that round, for the one type it can be spent on.
//!
//! # The gate is not a `#[cfg]`
//!
//! `if_async_graphql!` — the binding gate. A `#[cfg(feature = "async-graphql")]` written inside an
//! expansion asks whether the DECLARING crate has a feature by that name, which is a different
//! manifest and usually no feature at all; the gate asks the question of `ingraph`'s own build,
//! which is where the library actually is. Every backend impl in this crate already rides one.
//!
//! # The face is WRITTEN OUT, because a derive cannot be attached from here
//!
//! An attribute in IMPL position can be emitted freely — the impl is written here and the attribute
//! goes on it. A DERIVE cannot: a derive belongs to the type's own declaration, which
//! [`graphql`](super::graphql) writes OUTSIDE the gate, and a type that existed only where the
//! binding does would vanish from every build without it. Emitting the declaration twice, once with
//! the derive and once without, is the other way out, and it doubles the emitted text of a wire type
//! to buy back a derive whose whole output is one `InputType` impl.
//!
//! So the face is written out, exactly as `ingraph`'s own filter faces are, and for one of the same
//! reasons: **the registry entry is ours**, so `description: None` is a fact of the emission rather
//! than a hope about what a derive lifted. That matters here more than anywhere: the emitted
//! order-by carries generated prose on the type AND on every variant — *Order by the `title` column,
//! in the direction given* — and async-graphql's derives call `get_rustdoc` unconditionally with no
//! key to decline it, so a derive would have published all of it.
//!
//! # FOUR FACES SHIP, THREE UNCONDITIONALLY AND ONE UNDER A CONDITION
//!
//! `<E>OrderBy` names NO type the declaration chose: every field is an `OrderDirection`, which is the
//! framework's own. `<E>GraphqlOutput` and `<E>KeyOutput` DO name the declaration's types, and each
//! demands the OUTPUT CROSSING (`ingraph::ToGraphqlOutput`) of every form it returns — which is a
//! demand the framework can now meet for every class of its own vocabulary. So all three are
//! UNCONDITIONAL.
//!
//! **`<E>Filter` SHIPS TOO, and the condition it rides is the LIST LEG's.** It demands `InputType` of
//! every stored column's filter, and that demand cannot be made conditional AT THE IMPL: a `where`
//! clause naming only concrete types is a TRIVIAL BOUND, which stable rustc rejects at the item that
//! declares it (`trivial_bounds` is unstable). `renderable`, the helper that wrote such a clause, is
//! not resurrected. What is conditional instead is the EMISSION —
//! [`RecordModel::wire_filters`](crate::model::RecordModel::wire_filters) — and the condition is not
//! a guess about which filters render: it is *does anything on the wire take one*. async-graphql
//! registers the types reachable from the schema root, so a face no argument names is not in an SDL
//! at all, and emitting one would be an obligation with no reader.
//!
//! **What the two rows that HELD it cost, measured at this tip.** The whole workspace compiles
//! `--all-features` with the face emitted under that condition, and the corpus needed exactly two
//! changes, both in `ingraph-derive`'s `enums.rs` and both a DECLARATION rather than a framework row
//! — see the crossing's own note in [`super::cross`]. Neither of the two rows below was among them:
//! `TextFilter<Tag>` is `labels.rs`'s and that record has no stored id, so it has no query lane and
//! no argument asks it for a predicate; `ListFilter<u128, …>`'s element bound is
//! `ToGraphqlInput` since #231, which `u128` has a row in.
//!
//! The crossing rather than `OutputType` directly, and the difference is what a `u128` id renders
//! as: the emitted MEMBER stays the declaration's own type (layer 1, which no word moves), and the
//! resolver returns `<u128 as ToGraphqlOutput>::Output<'_>` — the `U128` carrier. Type-directed,
//! so `type Uuid7 = u128` reaches it too; a projection matching TOKENS would have handed the id
//! straight through and rendered nothing at all.
//!
//! Unconditional, they refuse declarations the framework itself cannot serve — and the size of that
//! refusal is MEASURED at this tip rather than predicted. The whole workspace was compiled with the
//! three faces emitted unconditionally, `--all-features`, and every unsatisfied row read off the
//! compiler:
//!
//! | missing row | where | who can supply it |
//! |---|---|---|
//! | `u128: OutputType` (×10) | `labels.rs`'s id | ~~the CARRIER projection~~ **CLOSED** — the OUTPUT CROSSING, and the face reads THROUGH it: an id member stays a `u128` and the resolver returns `<u128 as ToGraphqlOutput>::Output<'_>`, which IS `U128` |
//! | `SignedDuration: OutputType` | `fixtures.rs` | **CLOSED** by the same map, through `JiffDuration` |
//! | `Codec`/`Grade`/`Channel`/`Db`: `OutputType` | `enums.rs`, `fixtures.rs` | ~~**NOBODY**~~ **CLOSED** — `enumeration::wire` emits the output leg now, and `#[derive(ingraph::Enum)]` is the one door that carries it |
//! | `Codec`/`Grade`/`Db`: `InputType` | the same | **CLOSED, but not all by one word** — `Grade` is an `enum` and takes the derive; `fixtures.rs`'s `Codec` and `Db` are STRUCTS reading as enumerations, so no `enum` derive can serve them and the corpus pays a `#[Scalar]` each |
//! | `Tag`: `InputType`/`OutputType`, `Reel<Tag>`/`Roll<Tag>`: `OutputType` | `labels.rs`, `fixtures.rs` | **CLOSED by the corpus** — the OUTPUT leg needs no derive at all (`ToGraphqlOutput` is an ordinary trait a declaring crate writes for its own type, and a `Vec` of that type needs NOTHING further: the map reads its collection fork off the element's own `DefaultVecMarker`, which such a crate already writes for the filter side), and the INPUT leg is one `#[Scalar]` per type |
//! | `TextFilter<Tag>: InputType` | `labels.rs`, `fixtures.rs` | ~~**NOBODY**~~ **THE DECLARING CRATE, since #231** — the CARRIER AXIS is the road: `TextFilter<S, I>` carries the reading as a parameter, this crate holds ONE generic row over it, and a declaring crate joins by implementing `TextWire<Tag>` on a marker it owns. Unclaimed in the corpus, and it costs nothing there: neither record has a query lane |
//! | `u128: InputType` | `fixtures.rs`'s `shadowed` | ~~**NOBODY**~~ **CLOSED by #231** — the collection faces ask the element for `ToGraphqlInput` now rather than for `InputType`, and `u128` crosses through `U128` there |
//!
//! The COLLECTION classes this table used to carry are gone from it, and that is what the round that
//! wrote the generic `ListFilter<T, VF>` / `SetFilter<T, VF>` faces bought: an element a declaring
//! crate owns now reaches a schema through one local row in `ingraph`, so no `ListFilter<Tag, …>`
//! appears above.
//!
//! `graphql::filter`'s own note already says the shape out loud — *a `Vec<Timestamp>` column
//! resolves to `ListFilter<Timestamp>` in Rust and reaches no schema*, which the generic rows have
//! since answered. So *this declaration has no wire face* is the framework's designed state for part
//! of its own vocabulary, and an unconditional face turns that state into a compile error inside an
//! expansion its author cannot edit.
//!
//! **A CORRECTION, measured: RFC 2451 does NOT admit `impl ForeignTrait for ForeignType<Local>`.**
//! This note claimed it did, and that a declarer's crate could therefore have minted
//! `impl InputType for EnumFilter<Codec>`. It could not. The orphan rule's sequence is
//! `T0, T1..=Tn` — the self type followed by the TRAIT's parameters — and at least one of them must
//! be a LOCAL type, where `ForeignType<Local>` is not one. `InputType` takes no parameter, so the
//! sequence is the self type alone and there is nowhere for a local type to sit. What RFC 2451
//! actually admits is the local type in a trait parameter: `impl<T> ForeignTrait<Local> for
//! ForeignType<T>`. Measured by writing the impl out in full in `labels.rs` and reading `E0117` —
//! *impl doesn't have any local type before any uncovered type parameters*.
//!
//! The enum row's conclusion survives the correction and its reason changes: `EnumFilter` is
//! `ingraph`'s OWN type, so one generic `impl<T: InputType> InputType for EnumFilter<T>` there is a
//! plain local impl serving every declared enum at once — and that generic row is not a convenience,
//! it is the ONLY road. What is left for the declarer is `Codec: InputType`, an impl on its own type.
//!
//! **BOTH of the rows that were open are closed, and one axis closed them.**
//!
//! `TextFilter<Tag>: InputType` was `E0117` in the declaring crate for the reason just corrected, and
//! `E0119` in `ingraph`: a generic `impl<S: InputType> InputType for TextFilter<S>` overlapped the two
//! concrete registrations, and replacing them with one would have published `SmolStrFilter` —
//! async-graphql names that scalar `SmolStr` — renaming the canonical `TextFilter` the crate defends.
//! The CARRIER AXIS took the second wall away so the first stopped mattering: the reading is a
//! PARAMETER now (`TextFilter<S, I = Builtin>`), the two concrete registrations are rows of
//! `Builtin`'s, and one generic row over the parameter has nothing for coherence to reason about. A
//! declaring crate writes `impl TextWire<Tag> for TagWire`, which is legal there because the marker
//! is local.
//!
//! `u128: InputType` was the same wall from the other side, and it is what the generic collection
//! rows COST: `ListFilter<T, VF>` asked `T: InputType` for its six list slots and `hasElement`. The
//! bound is `ToGraphqlInput` now — the INPUT-side twin of the output crossing, keyed on the operand
//! type — so a `Vec<u128>` column publishes `[u128!]`, which is the form the scalar column of the
//! same type already published.
//!
//! **The OUTPUT leg of the vocabulary row is supplied**, and it was the single fact deciding whether
//! the three faces could ever be unconditional: a record exposing a vocabulary column — which two
//! corpus declarations and the executed wire schema all do — could carry no output object however
//! many other rows fell. `enumeration::wire` writes `OutputType` beside the input face, hand-written
//! and inside the binding gate, with one residual wall stated at that module: a build enabling
//! async-graphql's own `boxed-trait` feature refuses the impl (`E0195`), because that feature
//! rewrites the trait method into a boxed-future one.
//!
//! **Measured at this tip: the OUTPUT OBJECT and its ADDRESS have ZERO unsatisfied rows over the
//! whole corpus, and both now SHIP.** Both are emitted unconditionally, reading through
//! `ToGraphqlOutput`; the workspace compiles `--all-features --all-targets` and the executed
//! `ingraph/tests/wire_schema.rs` renders their SDL and reads real rows back through them.
//!
//! **And the FILTER ships with them, one condition apart.** The `where` argument names `<E>Filter`,
//! so the list resolver's predicate leg and this face are one round: `emit::queries` writes the
//! argument, `emit::cross` writes the crossing that resolves it against a store, and
//! `ingraph/tests/wire_where.rs` executes all three against a real SQLite pool. The ARGUMENT OBJECT's
//! `filter` member is a different position and is still nobody's — that object mirrors the engine's
//! find surface and no resolver takes one.
//!
//! One corpus row moved with the crossing's own rework: an element that appears in a COLLECTION now
//! owes `DefaultVecMarker`, because that is where the output map reads a `Vec`'s fork from. It is the
//! INPUT side's own trait, so the cost is one line and the fact is stated once for both positions —
//! `ingraph-derive`'s `labels.rs` carries it for `Tag`.
//!
//! # The naming layers, on this face
//!
//! An order-by field is an INPUT position, and it takes the FILTER's name for its column — one
//! column, one input name, so a client never spells the same column two ways in one document. The
//! OUTPUT position is free to differ and does: `output(rename = "startsAt")` moves what a client
//! READS and leaves `beginsAt` here, which is what two faces on the model are for.
//!
//! [`wire_field`] is the one rename act, and it applies only where the declaration named nothing —
//! so a declared name reaches a client exactly as written, and an undeclared one takes
//! async-graphql's own camelCase, which is the ruled division.
//!
//! The TYPE names are [`wire_type`]'s, and that rule is one sentence with two readings — see its own
//! note.
//!
//! # THE `__async_graphql_` PREFIX PIN — the emitted Rust idents are mangled and every wire name is
//! SPELLED
//!
//! Every FUNCTION an emitted `#[Object]` face declares — and every ARGUMENT one takes — wears the
//! `__async_graphql_` prefix, through [`method::wire_method`](crate::method::wire_method), which is
//! that shape's one home. The prefix is a namespace this emission owns AND it names the BACKEND
//! whose face this is, so a second GraphQL binding mints its own beside these rather than colliding
//! with them; a declaration writing into either is writing into the framework's, which is precisely
//! what the pin puts out of reach.
//!
//! **The wire names come back PER ITEM, and that is the mechanism rather than a detail.** A
//! `#[graphql(name = "…")]` sits on every field of both faces now, not only on the renamed ones:
//! async-graphql's default is the RENAME RULE over the method ident (`object.rs`'s
//! `method_args.name.clone().unwrap_or_else(|| rename_fields.rename(sig.ident.unraw(), …))`, 7.2.1),
//! and after the pin that ident is `__async_graphql_title`. The explicit key WINS over the rule at
//! both positions —
//! `args::ObjectField::name` for a field, `args::Argument::name` for an argument — which is what
//! makes per-item names the road.
//!
//! The IMPL-level knobs (`rename_fields`, `rename_args`) are NOT the road, and the reason is not
//! taste. A rule is ONE FUNCTION OF THE IDENT applied to every item of the block, and this face has
//! two kinds of name in it: a word the declaration wrote — `bitRate` over a member called `checksum`
//! — and the fallback for a field that wrote none. No function of `__async_graphql_checksum`
//! produces `bitRate`, so a rule cannot serve the first kind at all, and serving only the second is
//! what the per-item key already does.
//!
//! What a rule WOULD do is leave the wire a function of the mangling, and after the BACKEND SWEEP
//! that is no longer even a near miss. `Inflector` skips a leading separator run in both of its
//! families (`to_case_camel_like`'s `!found_real_char && is_not_alphanumeric` arm,
//! `to_case_snake_like`'s `first_character` guard) and camelCases what remains — so `__title` used
//! to render `title` by an upstream detail nothing promised, and `__async_graphql_title` renders
//! `asyncGraphqlTitle`. The written key is what holds the wire still across a prefix that names its
//! backend, which is why it is on EVERY item rather than on the renamed ones.
//!
//! Two things do NOT take the prefix, and each is ruled:
//!
//! * the emitted TYPES — `<E>GraphqlOutput`, `<E>KeyOutput`, `<E>OrderBy` — which are the visible
//! vocabulary a declaration names and an application mounts;
//! * the ACCESSORS [`graphql`](super::graphql) writes, which are layer 2 and the Rust read road, so
//! a caller spells `title_ref()` exactly as before.
//!
//! **SDL byte-identical**, and that is the proof the sweep was a rename of Rust idents alone: the
//! executed schemas of `ingraph/tests/wire_schema.rs` and `ingraph/tests/wire_trio.rs` export the
//! same bytes before and after.
//!
//! # BUILD PIN — every emitted async-graphql ATTRIBUTE passes `crate = "…"`
//!
//! The shelf's whole point is that a DECLARING crate never needs async-graphql in its own manifest:
//! `#krate::__private::async_graphql` is the path every emitted name is reached through, and
//! `RecordModel::framework` is what writes it. An ATTRIBUTE is the one thing that path is not enough
//! for, because a derive expands into paths of its OWN — and async-graphql's derives resolve those
//! through `proc_macro_crate::crate_name("async-graphql")`, read against the crate being compiled
//! (`async-graphql-derive`'s `get_crate_path`, `src/utils.rs`). In a declaring crate that lookup
//! fails and the fallback is a bare `::async_graphql`, which resolves to nothing.
//!
//! So an emitted async-graphql attribute has TWO halves and both are required:
//!
//! 1. the attribute's own PATH is the shelf path — `#[#krate::__private::async_graphql::Object]`,
//! never `#[::async_graphql::Object]`, or the ATTRIBUTE itself does not resolve;
//! 2. the `crate = "…"` key names the same shelf, or the attribute resolves and everything it
//! EXPANDS TO does not.
//!
//! This is the redirect sqlx never offered — its derives take no such key, which is why the row's
//! `FromRow` is written out by hand — and it is why async-graphql is the one shelved crate whose
//! derives are redirected rather than replaced.
//!
//! **The audit, measured at this tip:** the emission writes NO async-graphql attribute at all. The
//! order door below is three hand-written impls carrying `#[automatically_derived]` and nothing
//! else, and every async-graphql NAME inside them is already rooted through the shelf. So the rule
//! has nothing to fix here and everything to guard: `ingraph-codegen`'s own
//! `no_emitted_async_graphql_attribute_is_missing_the_crate_key` walks the emitted text of the
//! corpus and holds the rule over whatever a later round adds.
//!
//! `model::GraphqlKind` carries three attribute NAMES — `output_object`, `input_derive`,
//! `order_by_derive` — and `enumeration.rs` a fourth, all spelled as bare `::async_graphql::…`
//! paths. None of them is emitted today (they are read by pins alone), and each is half a rule when
//! it is: the path they answer is the one that does not resolve in a declaring crate. Whichever
//! round first spends one owes it both halves above.
use ;
use Spanned as _;
use crate::;
/// A declared name as a client sees it: verbatim where the declaration wrote one, and lower camel
/// case where the framework fell back on the Rust field's own name.
///
/// The fork is what keeps ⑤'s ruling true on a face that has no method for async-graphql to rename:
/// camelCase is the BACKEND's act over domain-named Rust fields, so applying it to a name a
/// declaration chose would be this emitter overriding that choice. `declared` is compared against
/// the field's own spelling to tell the two apart, and the comparison is exact rather than a guess —
/// the model stores the fallback AS the field's name, so equality is precisely *nothing was
/// written*.
pub
/// The client's name for a member NO declaration named: async-graphql's own camelCase over the Rust
/// name, with a raw prefix dropped.
///
/// Its own function because the prefix pin made it one. The library used to compute this itself,
/// off the method ident; the emitted idents are prefixed now, so the fallback has to be SPELLED — a
/// `#[graphql(name = "…")]` on every wire item, including the ones nobody renamed. Both faces read
/// it here rather than each spelling `lower_camel`, so *what a client sees where nothing was
/// written* has one home.
///
/// The unraw is [`RustSafeName`]'s, which is the crate's one answer to that question: `r#type` is how
/// Rust spells a column called `type`, and async-graphql's own rename runs through `Ident::unraw`
/// too — so this agrees with the library on the input the library used to be given.
///
/// `pub(crate)` since B-27: an INTERFACE has no per-field rename grammar at all, so every contract
/// field is this case, and reading the fallback here rather than respelling `lower_camel` is what
/// keeps one answer to *what a client sees where nothing was written*.
pub
/// `media_id` → `mediaId`. async-graphql's own field rename rule, applied where no method exists for
/// the library to apply it to.
///
/// # A LEADING underscore is EATEN, and that is a correction
///
/// This carried the opposite claim — *a leading underscore run is kept, because a rule that silently
/// produced `id` from `_id` would collide with the framework's own address member* — and the code
/// under it always dropped it. The tests beside this module caught the divergence, and the DOC is
/// what was wrong.
///
/// Measured, at the library this rule is a copy of: async-graphql renames a field through
/// `RenameTarget::Field` → `RenameRule::Camel` → `Inflector::to_camel_case`, whose loop `continue`s
/// past every non-alphanumeric character before the first real one (`Inflector` 0.11.4,
/// `src/cases/case/mod.rs`, the `!found_real_char && is_not_alphanumeric` arm). So `_id` renders as
/// `id` on an `#[Object]` method too — and "fixing" this function would have CREATED the divergence
/// it warned about, spelling one column `_id` on the hand-written face and `id` on the derived one.
///
/// The collision the old note feared is real and is async-graphql's, not this emitter's; a
/// declaration that writes `_id` beside the framework's own address member gets it either way, and
/// the place to refuse that is the emitted-type collision rule rather than a rename that disagreed
/// with the library.
///
/// The one deliberate difference is the DEGENERATE case: a name that is all separator (`__`) leaves
/// nothing to render, and this returns the name itself where `to_camel_case` returns the empty
/// string. An empty GraphQL field name is invalid SDL, so the fallback is the safer of two answers
/// for an input no declaration is expected to write.
/// The SDL name of ONE emitted type: a declared rename VERBATIM, and otherwise the name the
/// framework publishes for that type.
///
/// # The ruled rule, and why it needs the second parameter
///
/// *An emitted output publishes the record's TYPE name — strip the framework's default suffix,
/// publish a declared rename verbatim.* Read at the OUTPUT carriers that is a strip:
/// `VideoTrackGraphqlOutput` → `VideoTrack`, `VideoTrackKeyOutput` → `VideoTrackKey`, because
/// `GraphqlOutput` is a Rust CARRIER's convention and a client has no business reading it. Read at
/// the input types it is the identity: `VideoTrackOrderBy` and `VideoTrackFilter` are the names the
/// design's own SDL is written in, so there is nothing on them a schema does not read.
///
/// One function over both, because the half that differs is one VALUE — what to publish where the
/// declaration renamed nothing — and the half that does not is the rule: a name a declaration chose
/// is a name it chose, and no convention of this emitter may move it.
///
/// `default` is compared against the DECLARED name to tell the two cases apart, and the comparison
/// is exact rather than a guess: [`RustSafeName`] stores the framework's fallback AS the name, so
/// equality is precisely *nothing was written*. A declaration that renames a type to the string the
/// framework would have picked lands in the default arm, which is the same answer either way.
/// The OUTPUT OBJECT's published name — the one word both the object's own registration and the
/// root field returning it are built from.
///
/// Here rather than at either caller, because the two must agree by construction: a declared
/// `output(rename = "…")` moves the type a client reads AND the field it reads it through, and two
/// spellings of [`wire_type`]'s call is where that would come apart.
pub
/// The ADDRESS's BASE — the word both of its faces are built on where neither was named outright.
///
/// Here rather than at either caller, for [`published_output`]'s reason: `key(rename = "Address")`
/// re-bases BOTH halves of the address face, and two spellings of [`wire_type`]'s call is where that
/// would come apart.
///
/// # The `Input` SUFFIX IS THE ONE BLESSED DERIVATION, and no other rename composes
///
/// The user's ruling of 2026-08-16. A rename word is otherwise VERBATIM — what an author typed is
/// what a client reads — and the argument face's DEFAULT is the single exception, because GraphQL
/// keeps input and output types in ONE namespace: the sending half of an address must differ from
/// the reading half by something, and the only question is whether that something is predictable. It
/// is: the suffix is deterministic, it is the shape async-graphql's own derivations already take,
/// and a reader who wrote `Address` can say what the argument is called without looking.
///
/// **The precedent is narrow and is recorded as narrow**: this is the one composition, it applies to
/// the BASE alone, and a later reader may not cite it as licence for a second. In particular a
/// declared [`published_key_object`] does NOT compose — `output(rename = "AddressM")` leaves the
/// argument at `AddressInput`, because a name an author chose is not a stem this framework may
/// suffix. Two names in one namespace need two words or none, which is exactly why the member seats
/// were minted.
/// The ADDRESS OBJECT's published name — what a client READS an address back in.
///
/// MEMBER, then BASE-DERIVED, then DEFAULT, which is the 2026-08-16 ruling's resolution order read
/// at one seat: `key(output(rename = "…"))` answers first, `key(rename = "…")` re-bases where it did
/// not, and a record that wrote neither publishes `<Record>Key`. The member arm is answered without
/// consulting the base, which is what makes `key(output(rename = "…"))` STANDALONE-LEGAL.
pub
/// The ADDRESS ARGUMENT's published name — what a client SENDS a compound address in.
///
/// [`published_key`]'s twin at the other end of one address, under the same three-step resolution:
/// `key(input(rename = "…"))`, else the base with the one blessed suffix on it, else
/// `<Record>KeyInput`.
///
/// Here rather than at its one caller, for [`published_key`]'s reason — and the two are deliberately
/// NOT one function with a flag: the derivations differ (one composes, one does not) and a shared
/// body would have to branch on which face it was answering anyway.
pub
/// The published output's PLURAL — the declaration's own word where it wrote one, and otherwise the
/// word English gives the name [`published_output`] just answered.
///
/// Here, beside that one, for exactly its reason: the single and the page are two spellings of ONE
/// published name, so a declared `output(rename = "Track")` moves both together and neither caller
/// derives its own. A plural taken from the RECORD's name instead would leave a renamed record
/// answering `track(id:)` beside `reels`.
///
/// The WORD rather than the field name. Lowering an initial is [`super::queries`]'s one naming act
/// and stays there, so `plural = "Corpora"` and `plural = "corpora"` reach the same field — and the
/// next reader of this word (a connection, an aggregate) spells its own name from the same fact
/// rather than from a field name it would have to un-spell.
pub
/// The true prelude, re-imported around the two `#[Object]` blocks — the one place this emission
/// cannot write its own paths.
///
/// # It is a MEASURED defect of somebody else's macro, not a precaution
///
/// Every path this crate emits is absolute (`::core::option::Option::None`), because an expansion
/// lands in the DECLARER's namespace and a module that declares `struct None;` would otherwise
/// capture it. `ingraph-derive`'s `shadowed` fixture is that module, written to hold the rule.
///
/// `#[Object]` is async-graphql's macro and its output is not ours: it writes a bare `None`, which
/// the fixture's `pub struct None;` wins — `E0308: expected Option<__FieldIdent>, found None`,
/// reported at the `#[ingraph::record(…)]` the declarer wrote, naming a type nobody in that file
/// mentions. Measured the moment the output face went unconditional.
///
/// A `use` inside an anonymous const shadows the module's items for the tokens in that const and
/// nothing outside it, so the foreign expansion resolves the names it means. The const is the
/// crate's own grouping idiom — `enumeration::wire` already hosts the enum's whole face in one —
/// and TRAIT IMPLS inside one apply globally, which is what makes the wrapping free.
///
/// The list is the prelude the fixture shadows rather than the subset one library happens to spell:
/// what is being defended against is a foreign macro's tokens, and those change with its version.
pub