Commit 869ca46
authored
Propose single wrapping type (#4339)
This reduces the new AST-nodes to only be for the newly introduced type,
this does make it so that when we invoke `print` we have to rely on the
user to either specify that we're in semantic nullability mode _or_ we
could do a pre-traverse and when we enter a node with semantic-non-null
we toggle it on ourselves.
The main reasoning behind removing the new name for our existing null
type is that I would prefer to be backwards compatible in terms of
schema structure. This because it might become complex for people to
reason about composed schemas, i.e. a lot of individually parsed schemas
that later on compose into a larger one.
I know that _technically_ this is covered because in the classic ones
we'll have the non wrapped null type and in the modern ones we'll have
the semantic nullable wrapped type. For schema-builders like pothos and
others I think this is rather complex to reason about _and_ to supply us
with. I would instead choose to absorb this complexity in the feature
and stay backwards compatible.
This also sets us up for the SDL not being a breaking change, we only
add one AST-type, what's left now is to settle on a semantic non-null
syntax and making everything backwards compatible.1 parent 0f13010 commit 869ca46
File tree
13 files changed
+332
-439
lines changed- src
- execution
- __tests__
- language
- __tests__
- type
- utilities
13 files changed
+332
-439
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
690 | 689 | | |
691 | 690 | | |
692 | 691 | | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | 692 | | |
706 | 693 | | |
707 | 694 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
662 | | - | |
| 662 | + | |
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
697 | 697 | | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
| 698 | + | |
703 | 699 | | |
704 | 700 | | |
705 | 701 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
192 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
193 | 197 | | |
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
198 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
204 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
205 | 213 | | |
206 | 214 | | |
207 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
208 | 218 | | |
209 | 219 | | |
210 | 220 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | 165 | | |
167 | 166 | | |
168 | 167 | | |
| |||
238 | 237 | | |
239 | 238 | | |
240 | 239 | | |
241 | | - | |
242 | 240 | | |
243 | 241 | | |
244 | 242 | | |
| |||
529 | 527 | | |
530 | 528 | | |
531 | 529 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | 530 | | |
539 | 531 | | |
540 | 532 | | |
541 | 533 | | |
542 | 534 | | |
543 | 535 | | |
544 | | - | |
545 | | - | |
| 536 | + | |
546 | 537 | | |
547 | 538 | | |
548 | 539 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
795 | 794 | | |
796 | 795 | | |
797 | 796 | | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
| 797 | + | |
802 | 798 | | |
803 | 799 | | |
804 | 800 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
| |||
0 commit comments